Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / clr / src / BCL / System / Reflection / DefaultMemberAttribute.cs / 1305376 / 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;
[Serializable]
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Interface)]
[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.
// NOTE: There is no setter because the name must be provided
// to the constructor. The name is not optional.
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.
//
// ==--==
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
//
// 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;
[Serializable]
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Interface)]
[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.
// NOTE: There is no setter because the name must be provided
// to the constructor. The name is not optional.
public String MemberName {
get {return m_memberName;}
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- NavigationFailedEventArgs.cs
- BaseAddressElementCollection.cs
- ButtonFlatAdapter.cs
- RtfToXamlReader.cs
- SelectedDatesCollection.cs
- ProtocolsConfiguration.cs
- ClientRolePrincipal.cs
- LayoutInformation.cs
- DiffuseMaterial.cs
- XmlDictionaryReaderQuotas.cs
- Visual3D.cs
- AppSettingsSection.cs
- EmptyEnumerator.cs
- IPHostEntry.cs
- DataChangedEventManager.cs
- XPathQueryGenerator.cs
- ApplicationHost.cs
- OutputCacheSettings.cs
- DragEvent.cs
- SocketElement.cs
- XmlMapping.cs
- EndGetFileNameFromUserRequest.cs
- Knowncolors.cs
- XmlProcessingInstruction.cs
- NegotiationTokenAuthenticatorStateCache.cs
- XmlDocument.cs
- MarshalDirectiveException.cs
- DataTableReaderListener.cs
- ExceptionRoutedEventArgs.cs
- WindowPatternIdentifiers.cs
- AttributeEmitter.cs
- WinFormsSecurity.cs
- SmtpSection.cs
- RectangleGeometry.cs
- DataSetMappper.cs
- EdmEntityTypeAttribute.cs
- Item.cs
- AtomServiceDocumentSerializer.cs
- TreeNodeStyle.cs
- IProvider.cs
- QilFunction.cs
- Nullable.cs
- RegexMatchCollection.cs
- ServiceDocumentFormatter.cs
- Camera.cs
- UInt64Converter.cs
- CLSCompliantAttribute.cs
- SqlRowUpdatingEvent.cs
- SID.cs
- ListViewItem.cs
- XsltCompileContext.cs
- ResourceSet.cs
- baseshape.cs
- _HeaderInfo.cs
- TraceRecord.cs
- XmlDataProvider.cs
- AnnotationObservableCollection.cs
- TextSelectionHighlightLayer.cs
- StrokeSerializer.cs
- ListBox.cs
- ContextToken.cs
- ValidationPropertyAttribute.cs
- FormsAuthenticationModule.cs
- HorizontalAlignConverter.cs
- WebPartTransformer.cs
- SqlUserDefinedAggregateAttribute.cs
- DynamicDocumentPaginator.cs
- GatewayDefinition.cs
- MostlySingletonList.cs
- safelink.cs
- Point3DIndependentAnimationStorage.cs
- GeneralTransformGroup.cs
- OdbcConnection.cs
- FrameworkElementFactory.cs
- EmptyElement.cs
- ISO2022Encoding.cs
- OdbcException.cs
- TextEffect.cs
- NetworkInformationException.cs
- StandardToolWindows.cs
- FactoryGenerator.cs
- HttpServerVarsCollection.cs
- SaveWorkflowCommand.cs
- NegotiationTokenProvider.cs
- DesignBinding.cs
- ListViewSelectEventArgs.cs
- SchemaEntity.cs
- ListViewCancelEventArgs.cs
- DownloadProgressEventArgs.cs
- PointLightBase.cs
- BuildManager.cs
- DCSafeHandle.cs
- IPEndPoint.cs
- Label.cs
- DragEventArgs.cs
- XhtmlConformanceSection.cs
- FontNamesConverter.cs
- DocumentReferenceCollection.cs
- ArgumentException.cs
- ArrayConverter.cs