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
- StringFreezingAttribute.cs
- SvcMapFile.cs
- BooleanFunctions.cs
- ExceptionRoutedEventArgs.cs
- VBIdentifierNameEditor.cs
- _StreamFramer.cs
- QilReplaceVisitor.cs
- UseManagedPresentationBindingElement.cs
- TextDpi.cs
- DependencyPropertyDescriptor.cs
- InputBindingCollection.cs
- CollectionBuilder.cs
- XhtmlBasicSelectionListAdapter.cs
- SqlWebEventProvider.cs
- DataGridViewAutoSizeColumnModeEventArgs.cs
- HttpCachePolicyElement.cs
- SqlDataRecord.cs
- DataGridViewTopRowAccessibleObject.cs
- DiscoveryClientChannelFactory.cs
- MenuCommand.cs
- DispatchWrapper.cs
- DashStyle.cs
- TextEditorDragDrop.cs
- TypeListConverter.cs
- UserUseLicenseDictionaryLoader.cs
- BitConverter.cs
- LogManagementAsyncResult.cs
- ToolStripGripRenderEventArgs.cs
- filewebresponse.cs
- ProfileEventArgs.cs
- QuaternionValueSerializer.cs
- IgnoreFileBuildProvider.cs
- ReferencedCollectionType.cs
- DataGridRow.cs
- EditableRegion.cs
- RuntimeHandles.cs
- IntSumAggregationOperator.cs
- SafeEventLogReadHandle.cs
- TheQuery.cs
- DynamicPropertyHolder.cs
- ImageDesigner.cs
- KeyFrames.cs
- HeaderPanel.cs
- SessionState.cs
- ByteAnimationUsingKeyFrames.cs
- CaseDesigner.xaml.cs
- CounterCreationDataConverter.cs
- Configuration.cs
- CodeDomDesignerLoader.cs
- Claim.cs
- HttpResponseWrapper.cs
- EntityTypeBase.cs
- CompiledQueryCacheEntry.cs
- TextFormatter.cs
- TransformValueSerializer.cs
- OracleInfoMessageEventArgs.cs
- WebPartTracker.cs
- InputProviderSite.cs
- HtmlInputPassword.cs
- DataServiceQueryException.cs
- WebScriptMetadataMessage.cs
- WsdlHelpGeneratorElement.cs
- KeyValuePairs.cs
- ProbeDuplexAsyncResult.cs
- MediaCommands.cs
- ResourceProviderFactory.cs
- DocumentPageView.cs
- EDesignUtil.cs
- FullTrustAssemblyCollection.cs
- DirectionalLight.cs
- OleDbCommandBuilder.cs
- FailedToStartupUIException.cs
- SecurityContext.cs
- TraceContextRecord.cs
- SystemInfo.cs
- DataTableClearEvent.cs
- TreeViewAutomationPeer.cs
- WorkflowMessageEventHandler.cs
- RelatedImageListAttribute.cs
- DataGridViewRowPrePaintEventArgs.cs
- OracleEncoding.cs
- ContentIterators.cs
- GuidTagList.cs
- XmlBoundElement.cs
- Pen.cs
- MouseEvent.cs
- DeploymentSectionCache.cs
- XmlTextAttribute.cs
- CriticalHandle.cs
- WsdlBuildProvider.cs
- StaticExtensionConverter.cs
- XmlSchemaAttribute.cs
- RemotingClientProxy.cs
- VerticalAlignConverter.cs
- XmlUrlResolver.cs
- NumericExpr.cs
- RenderTargetBitmap.cs
- InternalConfigConfigurationFactory.cs
- SqlGenerator.cs
- RemoteWebConfigurationHostServer.cs