Update Reference Sources to .NET Framework 4.6.1
[mono.git] / mcs / class / referencesource / mscorlib / system / reflection / defaultmemberattribute.cs
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>[....]</OWNER>
12 //    member used by Type.InvokeMember.  The default member is simply a name given
13 //    to a type.
14 //
15 // 
16 // 
17 //
18 namespace System.Reflection {
19     
20     using System;
21
22 [Serializable]
23     [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Interface)]
24 [System.Runtime.InteropServices.ComVisible(true)]
25     public sealed class DefaultMemberAttribute : Attribute
26     {
27         // The name of the member
28         private String m_memberName;
29
30         // You must provide the name of the member, this is required
31         public DefaultMemberAttribute(String memberName) {
32             m_memberName = memberName;
33         }
34
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;}
40         }
41     }
42 }