Updates referencesource to .NET 4.7
[mono-project.git] / mcs / class / referencesource / mscorlib / system / reflection / defaultmemberattribute.cs
blob28af33c9dc696602e2a7d2692158378bb4608403
1 // ==++==
2 //
3 // Copyright (c) Microsoft Corporation. All rights reserved.
4 //
5 // ==--==
6 ////////////////////////////////////////////////////////////////////////////////
7 ////////////////////////////////////////////////////////////////////////////////
8 //
9 // DefaultMemberAttribute is defines the Member of a Type that is the "default"
10 //
11 // <OWNER>Microsoft</OWNER>
12 // member used by Type.InvokeMember. The default member is simply a name given
13 // to a type.
15 //
16 //
18 namespace System.Reflection {
20 using System;
22 [Serializable]
23 [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Interface)]
24 [System.Runtime.InteropServices.ComVisible(true)]
25 public sealed class DefaultMemberAttribute : Attribute
27 // The name of the member
28 private String m_memberName;
30 // You must provide the name of the member, this is required
31 public DefaultMemberAttribute(String memberName) {
32 m_memberName = memberName;
35 // A get accessor to return the name from the attribute.
36 // NOTE: There is no setter because the name must be provided
37 // to the constructor. The name is not optional.
38 public String MemberName {
39 get {return m_memberName;}