MustRunInClientContextAttribute.Value Özellik
Tanım
Önemli
Bazı bilgiler ürünün ön sürümüyle ilgilidir ve sürüm öncesinde önemli değişiklikler yapılmış olabilir. Burada verilen bilgilerle ilgili olarak Microsoft açık veya zımni hiçbir garanti vermez.
Öznitelikli nesnenin oluşturucu bağlamında oluşturulup oluşturulmayacağını gösteren bir değer alır.
public:
property bool Value { bool get(); };
public bool Value { get; }
member this.Value : bool
Public ReadOnly Property Value As Boolean
Özellik Değeri
true nesnesi oluşturucu bağlamında oluşturulacaksa; aksi takdirde , false. Varsayılan değer: true.
Örnekler
Aşağıdaki kod örneği, özniteliğin MustRunInClientContextValue özelliğinin değerini alır.
[MustRunInClientContext(false)]
public class MustRunInClientContextAttribute_Value : ServicedComponent
{
public void ValueExample()
{
// Get the MustRunInClientContextAttribute applied to the class.
MustRunInClientContextAttribute attribute =
(MustRunInClientContextAttribute)Attribute.GetCustomAttribute(
this.GetType(),
typeof(MustRunInClientContextAttribute),
false);
// Display the value of the attribute's Value property.
Console.WriteLine("MustRunInClientContextAttribute.Value: {0}",
attribute.Value);
}
}
<MustRunInClientContext(False)> _
Public Class MustRunInClientContextAttribute_Value
Inherits ServicedComponent
Public Sub ValueExample()
' Get the MustRunInClientContextAttribute applied to the class.
Dim attribute As MustRunInClientContextAttribute = CType(Attribute.GetCustomAttribute(Me.GetType(), GetType(MustRunInClientContextAttribute), False), MustRunInClientContextAttribute)
' Display the value of the attribute's Value property.
MsgBox("MustRunInClientContextAttribute.Value: " & attribute.Value)
End Sub
End Class