Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / ndp / fx / src / CompMod / System / ComponentModel / DefaultPropertyAttribute.cs / 1 / DefaultPropertyAttribute.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
/*
*/
namespace System.ComponentModel {
using System;
using System.Diagnostics;
using System.Security.Permissions;
///
/// Specifies the default property for a component.
///
[AttributeUsage(AttributeTargets.Class)]
public sealed class DefaultPropertyAttribute : Attribute {
///
/// This is the default event name.
///
private readonly string name;
///
///
/// Initializes a new instance of
/// the class.
///
///
public DefaultPropertyAttribute(string name) {
this.name = name;
}
///
///
/// Gets the name of the default property for the component this attribute is
/// bound to.
///
///
public string Name {
get {
return name;
}
}
///
///
/// Specifies the default value for the , which is . This
/// field is read-only.
///
///
public static readonly DefaultPropertyAttribute Default = new DefaultPropertyAttribute(null);
public override bool Equals(object obj) {
DefaultPropertyAttribute other = obj as DefaultPropertyAttribute;
return (other != null) && other.Name == name;
}
public override int GetHashCode() {
return base.GetHashCode();
}
}
}
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- SerializationTrace.cs
- InvokeHandlers.cs
- _ShellExpression.cs
- AdornerDecorator.cs
- MgmtConfigurationRecord.cs
- GridViewItemAutomationPeer.cs
- UseAttributeSetsAction.cs
- Misc.cs
- Relationship.cs
- SystemWebExtensionsSectionGroup.cs
- UndoManager.cs
- XmlUtf8RawTextWriter.cs
- Privilege.cs
- WebPartTransformerAttribute.cs
- ToolStripItemClickedEventArgs.cs
- Array.cs
- listitem.cs
- MaskDesignerDialog.cs
- EdmSchemaError.cs
- RuntimeArgument.cs
- AppSecurityManager.cs
- DataControlFieldHeaderCell.cs
- ContextInformation.cs
- XmlValueConverter.cs
- RawStylusSystemGestureInputReport.cs
- SafeNativeMethodsCLR.cs
- XmlSerializationGeneratedCode.cs
- ReferenceSchema.cs
- RadioButtonRenderer.cs
- EpmAttributeNameBuilder.cs
- SerializationException.cs
- TreeNodeConverter.cs
- TypeDescriptor.cs
- APCustomTypeDescriptor.cs
- AtomServiceDocumentSerializer.cs
- SR.cs
- CollectionBase.cs
- TimeStampChecker.cs
- Region.cs
- PolicyImporterElement.cs
- OneToOneMappingSerializer.cs
- XmlObjectSerializerWriteContextComplex.cs
- SqlConnectionString.cs
- ScriptResourceAttribute.cs
- UIPermission.cs
- COM2Enum.cs
- DataFormats.cs
- NumberSubstitution.cs
- DataGridHyperlinkColumn.cs
- CTreeGenerator.cs
- Thread.cs
- addressfiltermode.cs
- SqlServices.cs
- FileStream.cs
- InternalPolicyElement.cs
- ResourcePermissionBase.cs
- XmlReaderSettings.cs
- EventMappingSettingsCollection.cs
- ServiceMetadataPublishingElement.cs
- ManifestBasedResourceGroveler.cs
- Polygon.cs
- Material.cs
- ResourceWriter.cs
- SQLMembershipProvider.cs
- BuilderPropertyEntry.cs
- ResourceIDHelper.cs
- TabItemWrapperAutomationPeer.cs
- ExternalException.cs
- LocalizedNameDescriptionPair.cs
- FormConverter.cs
- StringUtil.cs
- TextEditor.cs
- InputScopeNameConverter.cs
- ExeContext.cs
- KeyInfo.cs
- XmlComment.cs
- ObjectPersistData.cs
- NativeMethods.cs
- ViewStateModeByIdAttribute.cs
- TraceUtility.cs
- ServiceModelReg.cs
- ImageListImage.cs
- XPathMultyIterator.cs
- DataGrid.cs
- SvcMapFileLoader.cs
- ShaderRenderModeValidation.cs
- DeviceFiltersSection.cs
- DateTimeFormat.cs
- WebPartConnectionCollection.cs
- ISAPIApplicationHost.cs
- TextShapeableCharacters.cs
- CodeConstructor.cs
- InputLangChangeRequestEvent.cs
- BasicHttpSecurityMode.cs
- StructuredProperty.cs
- EditorPartChrome.cs
- SimpleTextLine.cs
- ContainerControl.cs
- CodeAttributeArgumentCollection.cs
- ThreadInterruptedException.cs