Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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; ////// [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
- Blend.cs
- FunctionGenerator.cs
- LineInfo.cs
- CurrentChangedEventManager.cs
- XmlnsCompatibleWithAttribute.cs
- DbConnectionPoolCounters.cs
- NullableConverter.cs
- DefaultTextStore.cs
- ComponentGlyph.cs
- DataColumnPropertyDescriptor.cs
- VectorConverter.cs
- ContentType.cs
- ClientApiGenerator.cs
- ManipulationPivot.cs
- KeyValuePair.cs
- Message.cs
- MessageSecurityOverTcpElement.cs
- ProcessHostFactoryHelper.cs
- AmbientValueAttribute.cs
- PolyQuadraticBezierSegment.cs
- StylusPointPropertyInfoDefaults.cs
- EventManager.cs
- RowToFieldTransformer.cs
- MultilineStringConverter.cs
- RawStylusSystemGestureInputReport.cs
- DecimalConverter.cs
- ReflectionPermission.cs
- CompressStream.cs
- DefaultBinder.cs
- WindowsScroll.cs
- LocalizableAttribute.cs
- WeakHashtable.cs
- TreeWalkHelper.cs
- DbParameterCollectionHelper.cs
- WebPartVerbCollection.cs
- DateTimeOffsetAdapter.cs
- SQLChars.cs
- MenuAdapter.cs
- CommonProperties.cs
- DiscoveryInnerClientAdhoc11.cs
- UpdatePanelTriggerCollection.cs
- OrderedDictionary.cs
- TableLayoutCellPaintEventArgs.cs
- SQLDecimal.cs
- EntityDesignerDataSourceView.cs
- _OverlappedAsyncResult.cs
- CounterSample.cs
- CodeDirectoryCompiler.cs
- LambdaCompiler.cs
- Panel.cs
- GeneratedCodeAttribute.cs
- ArrangedElement.cs
- DbCommandDefinition.cs
- AbandonedMutexException.cs
- TextFragmentEngine.cs
- Sorting.cs
- ActivationService.cs
- PropertyToken.cs
- SerializationEventsCache.cs
- ThreadStateException.cs
- CodeTypeDeclaration.cs
- SoapIgnoreAttribute.cs
- BindingNavigator.cs
- RbTree.cs
- ProgressBar.cs
- KoreanLunisolarCalendar.cs
- ResXResourceReader.cs
- ActionMismatchAddressingException.cs
- PixelFormats.cs
- ServiceRoute.cs
- SrgsGrammarCompiler.cs
- ReferentialConstraintRoleElement.cs
- BitmapFrameEncode.cs
- SiblingIterators.cs
- EntityDataSourceQueryBuilder.cs
- QueueProcessor.cs
- DbConnectionHelper.cs
- KeyPressEvent.cs
- HttpWriter.cs
- StoragePropertyMapping.cs
- AutomationElementIdentifiers.cs
- WorkflowOperationAsyncResult.cs
- CngProvider.cs
- TraceFilter.cs
- HelpInfo.cs
- BooleanExpr.cs
- XmlDataSourceNodeDescriptor.cs
- PropertyTab.cs
- recordstatescratchpad.cs
- IPEndPoint.cs
- XmlSchemaCollection.cs
- WSDualHttpSecurity.cs
- SafeViewOfFileHandle.cs
- NumericUpDownAcceleration.cs
- IdentitySection.cs
- Debug.cs
- UserPreferenceChangedEventArgs.cs
- ScriptComponentDescriptor.cs
- FillErrorEventArgs.cs
- ExpressionQuoter.cs