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
- Pts.cs
- WindowsComboBox.cs
- VisualTarget.cs
- SerializationStore.cs
- WebConfigurationHost.cs
- TreeNodeBindingCollection.cs
- DBAsyncResult.cs
- BitmapEffectDrawing.cs
- X509ChainPolicy.cs
- ByteRangeDownloader.cs
- Variable.cs
- NamespaceDecl.cs
- UpWmlMobileTextWriter.cs
- PlanCompilerUtil.cs
- ToolBarOverflowPanel.cs
- FilterEventArgs.cs
- JulianCalendar.cs
- JournalEntry.cs
- DataGridCellEditEndingEventArgs.cs
- DesignerTransactionCloseEvent.cs
- SqlUDTStorage.cs
- LocalFileSettingsProvider.cs
- FloaterParaClient.cs
- ThreadPool.cs
- SubpageParaClient.cs
- UInt64Storage.cs
- WebPartZoneBase.cs
- Image.cs
- FrameworkElementFactory.cs
- HttpHeaderCollection.cs
- CompilerGeneratedAttribute.cs
- TypeInitializationException.cs
- SortDescription.cs
- ListViewInsertionMark.cs
- SectionInformation.cs
- OdbcConnectionHandle.cs
- DataGridViewTextBoxEditingControl.cs
- HttpStreamXmlDictionaryReader.cs
- StringBuilder.cs
- ChildTable.cs
- ProxyOperationRuntime.cs
- StorageMappingItemLoader.cs
- ResponseStream.cs
- PathFigure.cs
- EdmTypeAttribute.cs
- PriorityItem.cs
- InfoCardBaseException.cs
- ColumnHeaderConverter.cs
- ChildrenQuery.cs
- HelpKeywordAttribute.cs
- InputScope.cs
- latinshape.cs
- PropertyHelper.cs
- CorrelationService.cs
- Psha1DerivedKeyGenerator.cs
- TargetControlTypeCache.cs
- TriggerActionCollection.cs
- SizeAnimationClockResource.cs
- LinkedList.cs
- CombinedHttpChannel.cs
- MsmqInputMessagePool.cs
- DesigntimeLicenseContext.cs
- SqlClientPermission.cs
- ListViewVirtualItemsSelectionRangeChangedEvent.cs
- StylusPointDescription.cs
- AttributeParameterInfo.cs
- AppDomainAttributes.cs
- AttributeQuery.cs
- WinEventWrap.cs
- ServicesExceptionNotHandledEventArgs.cs
- X509Utils.cs
- XmlResolver.cs
- ListCollectionView.cs
- Geometry.cs
- GridViewRow.cs
- ProjectedSlot.cs
- SafeSecurityHandles.cs
- DependentList.cs
- StaticExtension.cs
- EndpointAddressMessageFilterTable.cs
- TextTrailingWordEllipsis.cs
- LookupBindingPropertiesAttribute.cs
- AccessibleObject.cs
- CheckBoxFlatAdapter.cs
- SiteIdentityPermission.cs
- AnimatedTypeHelpers.cs
- TargetControlTypeAttribute.cs
- SpecialNameAttribute.cs
- DbConnectionPool.cs
- SHA256Managed.cs
- ParseNumbers.cs
- HtmlButton.cs
- InputLanguageCollection.cs
- DataBindingHandlerAttribute.cs
- MenuItemBinding.cs
- CodeTypeMember.cs
- FixedElement.cs
- StreamInfo.cs
- ExtensibleClassFactory.cs
- FlagsAttribute.cs