EventTrackingEnabledAttribute.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 the value of the Value property, which indicates whether tracking is enabled.
public:
property bool Value { bool get(); };
public bool Value { get; }
member this.Value : bool
Public ReadOnly Property Value As Boolean
Property Value
true
if tracking is enabled; otherwise, false
. The default is true
.
Examples
The following code example gets the value of an EventTrackingEnabled
attribute's Value property.
[EventTrackingEnabled(false)]
public class EventTrackingEnabledAttribute_Value : ServicedComponent
{
public void ValueExample()
{
// Get the EventTrackingEnabledAttribute applied to the class.
EventTrackingEnabledAttribute attribute =
(EventTrackingEnabledAttribute)Attribute.GetCustomAttribute(
this.GetType(),
typeof(EventTrackingEnabledAttribute),
false);
// Display the value of the attribute's Value property.
Console.WriteLine("EventTrackingEnabledAttribute.Value: {0}",
attribute.Value);
}
}
<EventTrackingEnabled(False)> _
Public Class EventTrackingEnabledAttribute_Value
Inherits ServicedComponent
Public Sub ValueExample()
' Get the EventTrackingEnabledAttribute applied to the class.
Dim attribute As EventTrackingEnabledAttribute = CType(Attribute.GetCustomAttribute(Me.GetType(), GetType(EventTrackingEnabledAttribute), False), EventTrackingEnabledAttribute)
' Display the value of the attribute's Value property.
MsgBox("EventTrackingEnabledAttribute.Value: " & attribute.Value)
End Sub
End Class
Applies to
التعاون معنا على GitHub
يمكن العثور على مصدر هذا المحتوى على GitHub حيث يمكنك أيضاً إضافة مشاكل وطلبات سحب ومراجعتها. للحصول على معلومات إضافية، اطلع على دليل المساهم لدينا.
الملاحظات
https://aka.ms/ContentUserFeedback.
قريبًا: خلال عام 2024، سنتخلص تدريجيًا من GitHub Issues بوصفها آلية إرسال ملاحظات للمحتوى ونستبدلها بنظام ملاحظات جديد. لمزيد من المعلومات، راجعإرسال الملاحظات وعرضها المتعلقة بـ