共用方式為


JustInTimeActivationAttribute.Value 屬性

定義

取得 JustInTimeActivationAttribute 設定的值。

public:
 property bool Value { bool get(); };
public bool Value { get; }
member this.Value : bool
Public ReadOnly Property Value As Boolean

屬性值

如果啟用 JIT 啟動過程,則為 true,否則為 false。 預設為 true

範例

下列程式代碼範例會 JustInTimeActivation 取得屬性的 Value 屬性值。

[JustInTimeActivation(false)]
public class JITAAttribute_Value : ServicedComponent
{
    public void ValueExample()
    {
        // Get the JustInTimeActivationAttribute applied to the class.
        JustInTimeActivationAttribute attribute =
            (JustInTimeActivationAttribute)Attribute.GetCustomAttribute(
            this.GetType(),
            typeof(JustInTimeActivationAttribute),
            false);

        // Display the value of the attribute's Value property.
        Console.WriteLine("JustInTimeActivationAttribute.Value: {0}",
            attribute.Value);
    }
}
<JustInTimeActivation(False)>  _
Public Class JITAAttribute_Value
    Inherits ServicedComponent
    
    Public Sub ValueExample() 
        ' Get the JustInTimeActivationAttribute applied to the class.
        Dim attribute As JustInTimeActivationAttribute = CType(Attribute.GetCustomAttribute(Me.GetType(), GetType(JustInTimeActivationAttribute), False), JustInTimeActivationAttribute)
        
        ' Display the value of the attribute's Value property.
        MsgBox("JustInTimeActivationAttribute.Value: " & attribute.Value)
    
    End Sub
End Class

適用於