O'Reilly logo

C# in a Nutshell by Peter Drayton, Ted Neward, Ben Albahari

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

DefaultMemberAttribute

Synopsis

This attribute allows you to specify the default member of a class. This is often an indexer. C# does not permit the use of default members as part of the language, although other .NET languages (most notably VB.NET) do.

public sealed class DefaultMemberAttribute : Attribute {
// Public Constructors
   public method DefaultMemberAttribute(string memberName);  
// Public Instance Properties
   public field string MemberName{get; } 
}

Hierarchy

System.ObjectSystem.AttributeDefaultMemberAttribute

Valid On

Class, Struct, Interface

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required