Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / CompMod / System / ComponentModel / DefaultPropertyAttribute.cs / 1305376 / DefaultPropertyAttribute.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- /* */ namespace System.ComponentModel { using System; using System.Diagnostics; using System.Security.Permissions; ////// [AttributeUsage(AttributeTargets.Class)] public sealed class DefaultPropertyAttribute : Attribute { ///Specifies the default property for a component. ////// This is the default event name. /// private readonly string name; ////// public DefaultPropertyAttribute(string name) { this.name = name; } ////// Initializes a new instance of /// the ///class. /// /// public string Name { get { return name; } } ////// Gets the name of the default property for the component this attribute is /// bound to. /// ////// 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(); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ ///// Specifies the default value for the ///, which is . This /// field is read-only. /// // Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- /* */ namespace System.ComponentModel { using System; using System.Diagnostics; using System.Security.Permissions; ////// [AttributeUsage(AttributeTargets.Class)] public sealed class DefaultPropertyAttribute : Attribute { ///Specifies the default property for a component. ////// This is the default event name. /// private readonly string name; ////// public DefaultPropertyAttribute(string name) { this.name = name; } ////// Initializes a new instance of /// the ///class. /// /// public string Name { get { return name; } } ////// Gets the name of the default property for the component this attribute is /// bound to. /// ////// 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(); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007./// Specifies the default value for the ///, which is . This /// field is read-only. ///
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- TextTabProperties.cs
- BindingMAnagerBase.cs
- FilterableAttribute.cs
- SortDescriptionCollection.cs
- IncrementalReadDecoders.cs
- SystemWebCachingSectionGroup.cs
- DefaultBindingPropertyAttribute.cs
- CompilerLocalReference.cs
- NamespaceTable.cs
- WorkflowOwnershipException.cs
- SoapSchemaExporter.cs
- TagMapCollection.cs
- CompareInfo.cs
- ResourceType.cs
- BitStream.cs
- WindowsUpDown.cs
- GroupBox.cs
- CompilerWrapper.cs
- UTF32Encoding.cs
- MsmqIntegrationSecurity.cs
- TaiwanLunisolarCalendar.cs
- EngineSite.cs
- HtmlLinkAdapter.cs
- PropertyGridEditorPart.cs
- ConfigurationCollectionAttribute.cs
- StreamGeometryContext.cs
- Camera.cs
- UpDownEvent.cs
- NetNamedPipeSecurityElement.cs
- HttpModuleAction.cs
- Transform3D.cs
- xdrvalidator.cs
- Util.cs
- ErrorTableItemStyle.cs
- QueueProcessor.cs
- Encoder.cs
- WindowsRegion.cs
- LabelLiteral.cs
- TransformCryptoHandle.cs
- ModuleBuilder.cs
- ExtensibleClassFactory.cs
- RawStylusActions.cs
- StatusBarPanel.cs
- BamlLocalizabilityResolver.cs
- FixedBufferAttribute.cs
- XmlNodeReader.cs
- RawTextInputReport.cs
- HtmlFormWrapper.cs
- BroadcastEventHelper.cs
- SiteOfOriginPart.cs
- XmlSchemaIdentityConstraint.cs
- Compiler.cs
- ColorContext.cs
- MSAAWinEventWrap.cs
- CompilationUnit.cs
- BrowserInteropHelper.cs
- RegexWorker.cs
- Compiler.cs
- OleDbError.cs
- SettingsPropertyValueCollection.cs
- BitHelper.cs
- ResourceReader.cs
- CustomWebEventKey.cs
- BitmapPalette.cs
- DataServiceConfiguration.cs
- DecimalConstantAttribute.cs
- XmlDataLoader.cs
- ParseChildrenAsPropertiesAttribute.cs
- BoolExpr.cs
- TextWriterTraceListener.cs
- EntityWithChangeTrackerStrategy.cs
- SerializationSectionGroup.cs
- SoapMessage.cs
- TriggerBase.cs
- MenuItemCollectionEditorDialog.cs
- Page.cs
- DialogResultConverter.cs
- XsdCachingReader.cs
- SessionStateItemCollection.cs
- ObjectSecurity.cs
- SignedXmlDebugLog.cs
- UpDownEvent.cs
- WindowsPrincipal.cs
- DocumentXmlWriter.cs
- Authorization.cs
- LockedAssemblyCache.cs
- FamilyTypeface.cs
- RelationshipType.cs
- AssertSection.cs
- TimeSpanConverter.cs
- NullableFloatSumAggregationOperator.cs
- PropertyMap.cs
- GridViewCommandEventArgs.cs
- NavigationExpr.cs
- UpDownEvent.cs
- AsymmetricSignatureFormatter.cs
- OutputCacheSection.cs
- NameObjectCollectionBase.cs
- SqlWebEventProvider.cs
- Application.cs