DynamicMethod.Attributes 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 attributes specified when the dynamic method was created.
public:
virtual property System::Reflection::MethodAttributes Attributes { System::Reflection::MethodAttributes get(); };
public override System.Reflection.MethodAttributes Attributes { get; }
member this.Attributes : System.Reflection.MethodAttributes
Public Overrides ReadOnly Property Attributes As MethodAttributes
Property Value
A bitwise combination of the MethodAttributes values representing the attributes for the method.
Examples
The following code example displays the method attributes of a dynamic method. This code example is part of a larger example provided for the DynamicMethod class.
// Display MethodAttributes for the dynamic method, set when
// the dynamic method was created.
Console::WriteLine("\r\nMethod Attributes: {0}", hello->Attributes);
// Display MethodAttributes for the dynamic method, set when
// the dynamic method was created.
Console.WriteLine("\r\nMethod Attributes: {0}", hello.Attributes);
' Display MethodAttributes for the dynamic method, set when
' the dynamic method was created.
Console.WriteLine(vbCrLf & "Method Attributes: {0}", _
hello.Attributes)
Remarks
Currently, the method attributes for a dynamic method are always Public and Static.
Applies to
Feedback
https://aka.ms/ContentUserFeedback.
Binnenkort: Gedurende 2024 worden GitHub Issues uitgefaseerd als het feedbackmechanisme voor inhoud. Dit wordt vervangen door een nieuw feedbacksysteem. Ga voor meer informatie naar:Feedback verzenden en bekijken voor