Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / ndp / fx / src / CompMod / System / ComponentModel / DefaultEventAttribute.cs / 1 / DefaultEventAttribute.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
/*
*/
namespace System.ComponentModel {
using System;
using System.Diagnostics;
using System.Security.Permissions;
///
/// Specifies the default event for a
/// component.
///
[AttributeUsage(AttributeTargets.Class)]
public sealed class DefaultEventAttribute : Attribute {
///
/// This is the default event name.
///
private readonly string name;
///
///
/// Initializes
/// a new instance of the class.
///
///
public DefaultEventAttribute(string name) {
this.name = name;
}
///
///
/// Gets the name of the default event 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 DefaultEventAttribute Default = new DefaultEventAttribute(null);
public override bool Equals(object obj) {
DefaultEventAttribute other = obj as DefaultEventAttribute;
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
- EmptyControlCollection.cs
- InternalEnumValidator.cs
- AssemblyResourceLoader.cs
- InProcStateClientManager.cs
- EventListener.cs
- PartManifestEntry.cs
- RankException.cs
- SoapFormatterSinks.cs
- ComEventsHelper.cs
- RectangleF.cs
- TextContainerChangeEventArgs.cs
- DecodeHelper.cs
- SchemaTypeEmitter.cs
- NameValuePermission.cs
- recordstatescratchpad.cs
- TraceListeners.cs
- ProvidersHelper.cs
- FormViewActionList.cs
- ApplicationManager.cs
- Console.cs
- FixedDocumentPaginator.cs
- TextElement.cs
- StateBag.cs
- SchemaElementDecl.cs
- DiscoveryServerProtocol.cs
- ThrowOnMultipleAssignment.cs
- PropertyValidationContext.cs
- XmlImplementation.cs
- X509Certificate.cs
- _ContextAwareResult.cs
- SafeHandle.cs
- DragStartedEventArgs.cs
- ConfigXmlWhitespace.cs
- FontFamily.cs
- ListenerElementsCollection.cs
- EndPoint.cs
- TreeNodeStyle.cs
- Inline.cs
- ConsumerConnectionPoint.cs
- HtmlControl.cs
- ExpressionBuilderContext.cs
- Point.cs
- StrokeNodeOperations.cs
- HtmlControlAdapter.cs
- HtmlAnchor.cs
- AttachInfo.cs
- TypeTypeConverter.cs
- ByteStack.cs
- ResourceCollectionInfo.cs
- RectConverter.cs
- GetWorkflowTree.cs
- UpdatableGenericsFeature.cs
- CodeDelegateCreateExpression.cs
- HostProtectionException.cs
- WebAdminConfigurationHelper.cs
- ReferencedCollectionType.cs
- RootBrowserWindowProxy.cs
- DurableEnlistmentState.cs
- PersonalizationStateInfo.cs
- BamlVersionHeader.cs
- DecimalAnimationBase.cs
- TraceContextRecord.cs
- SweepDirectionValidation.cs
- GetPageCompletedEventArgs.cs
- TextRenderingModeValidation.cs
- ReflectionPermission.cs
- FixedTextPointer.cs
- UInt32.cs
- ValidationErrorCollection.cs
- ReplacementText.cs
- DBConnectionString.cs
- DateTimeOffsetStorage.cs
- CompatibleIComparer.cs
- TreeNodeEventArgs.cs
- XmlDataSourceNodeDescriptor.cs
- ResourceDictionaryCollection.cs
- XMLSchema.cs
- EventDriven.cs
- HyperLinkField.cs
- Timeline.cs
- IconHelper.cs
- EFColumnProvider.cs
- UnitySerializationHolder.cs
- DocumentViewerBase.cs
- AutomationPropertyInfo.cs
- StylusShape.cs
- GroupedContextMenuStrip.cs
- AccessKeyManager.cs
- MailSettingsSection.cs
- CellTreeNodeVisitors.cs
- FixedFindEngine.cs
- SafeSecurityHandles.cs
- SynthesizerStateChangedEventArgs.cs
- TypeBinaryExpression.cs
- PropertyKey.cs
- XmlParserContext.cs
- ManifestResourceInfo.cs
- DataGrid.cs
- RelatedImageListAttribute.cs
- SystemColors.cs