Type Summary
public enum EventAttributes
{
None = 0x0,
MS ReservedMask = 0x400,
MS RTSpecialName = 0x400,
SpecialName = 0x200,
}
Example
using System;
using System.Reflection;
using System.Runtime.CompilerServices;
/// <summary>
/// This example shows getting the EventInfo from a Type and
/// printing its name and attributes.
/// </summary>
public class EventAttributesSample
{
public static void Main()
{
Type type = typeof(SampleButton);
EventInfo evnt = type.GetEvent("ClickEvent");
Console.WriteLine("Event_u39 ?{0}' Attributes: '{1}'",
evnt.Name,evnt.Attributes);
Console.WriteLine();
Console.WriteLine();
Console.WriteLine("Press Enter to continue");
Console.ReadLine();
}
}
public class SampleButton
{
//disabled compiler warning 67: ClickEvent not used.
public event EventHandler ClickEvent;
}
The output is
Event 'ClickEvent' Attributes: 'None'
Press Enter to continue
|