public sealed class DefaultMemberAttribute : Attribute
Object
Attribute
DefaultMemberAttribute
mscorlib
RuntimeInfrastructure
Defines the member that is invoked when no member name is specified for the type targeted by DefaultMemberAttribute .
[Note: This attribute is used by the System.Type.InvokeMember(System.String,System.Reflection.BindingFlags,System.Reflection.Binder,System.Object,System.Object[],System.Reflection.ParameterModifier[],System.Globalization.CultureInfo,System.String[]) methods.This attribute can be applied to classes, structs, and interfaces.
]
AttributeUsageAttribute(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Interface, AllowMultiple=false, Inherited=true)
System.Reflection Namespace
DefaultMemberAttribute Constructors
DefaultMemberAttribute Constructor
DefaultMemberAttribute Properties
public DefaultMemberAttribute(string memberName);
Constructs and initializes new instance of the DefaultMemberAttribute class.
- memberName
- A String containing the name of the member to invoke. Can be a constructor, method, property, or field.
This constructor initializes the System.Reflection.DefaultMemberAttribute.MemberName property using memberName .
System.Reflection.DefaultMemberAttribute Class, System.Reflection Namespace
public string MemberName { get; }
Gets the member name contained by the current instance.
A String representing the member name contained by the current instance.
This property is read-only.
System.Reflection.DefaultMemberAttribute Class, System.Reflection Namespace