MustRunInClientContextAttribute.Value Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets a value that indicates whether the attributed object is to be created in the context of the creator.
public:
property bool Value { bool get(); };
public bool Value { get; }
member this.Value : bool
Public ReadOnly Property Value As Boolean
Property Value
true
if the object is to be created in the context of the creator; otherwise, false
. The default is true
.
Examples
The following code example gets the value of a MustRunInClientContext
attribute's Value property.
[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
Applies to
التعاون معنا على GitHub
يمكن العثور على مصدر هذا المحتوى على GitHub حيث يمكنك أيضاً إضافة مشاكل وطلبات سحب ومراجعتها. للحصول على معلومات إضافية، اطلع على دليل المساهم لدينا.
الملاحظات
https://aka.ms/ContentUserFeedback.
قريبًا: خلال عام 2024، سنتخلص تدريجيًا من GitHub Issues بوصفها آلية إرسال ملاحظات للمحتوى ونستبدلها بنظام ملاحظات جديد. لمزيد من المعلومات، راجعإرسال الملاحظات وعرضها المتعلقة بـ