DefaultMemberAttribute.cs source code in C# .NET

Source code for the .NET framework in C#

                        

Code:

/ FXUpdate3074 / FXUpdate3074 / 1.1 / untmp / whidbey / QFE / ndp / clr / src / BCL / System / Reflection / DefaultMemberAttribute.cs / 1 / DefaultMemberAttribute.cs

                            // ==++== 
//
//   Copyright (c) Microsoft Corporation.  All rights reserved.
//
// ==--== 
////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////// 
// 
// DefaultMemberAttribute is defines the Member of a Type that is the "default"
// member used by Type.InvokeMember.  The default member is simply a name given 
// to a type.
//
//
// 
//
namespace System.Reflection { 
 
    using System;
 
    [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Interface),Serializable]
[System.Runtime.InteropServices.ComVisible(true)]
    public sealed class DefaultMemberAttribute : Attribute
    { 
       // The name of the member
      private String m_memberName; 
 
      // You must provide the name of the member, this is required
      public DefaultMemberAttribute(String memberName) { 
         m_memberName = memberName;
      }

      // A get accessor to return the name from the attribute. 
      //
  
        public String MemberName { 
         get {return m_memberName;}
      } 
    }
}

// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.


                        

Link Menu

Network programming in C#, Network Programming in VB.NET, Network Programming in .NET
This book is available now!
Buy at Amazon US or
Buy at Amazon UK