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
- HeaderPanel.cs
- ActivityExecutorOperation.cs
- TextContainerChangedEventArgs.cs
- XamlPointCollectionSerializer.cs
- CommandEventArgs.cs
- GlobalProxySelection.cs
- Int32Animation.cs
- XmlDataImplementation.cs
- ScrollItemProviderWrapper.cs
- SessionStateItemCollection.cs
- WorkflowViewElement.cs
- EdgeModeValidation.cs
- LoginUtil.cs
- FormViewRow.cs
- FixedSOMLineCollection.cs
- TextViewSelectionProcessor.cs
- HttpDebugHandler.cs
- CompileXomlTask.cs
- EmbeddedMailObject.cs
- DataSourceControl.cs
- UnitySerializationHolder.cs
- TimestampInformation.cs
- WindowsScroll.cs
- RuleSettings.cs
- EventSetterHandlerConverter.cs
- ViewStateException.cs
- ListViewItem.cs
- InstanceLockException.cs
- AsyncInvokeContext.cs
- SimplePropertyEntry.cs
- SystemGatewayIPAddressInformation.cs
- FrugalMap.cs
- InputProviderSite.cs
- CommunicationObject.cs
- Rect3D.cs
- JoinElimination.cs
- MethodAccessException.cs
- FilterableAttribute.cs
- AutomationProperties.cs
- Underline.cs
- Rotation3D.cs
- ReaderWriterLockWrapper.cs
- UrlMappingCollection.cs
- MarkupProperty.cs
- PrivilegedConfigurationManager.cs
- SettingsPropertyIsReadOnlyException.cs
- DebugControllerThread.cs
- PropertyGeneratedEventArgs.cs
- PlaceHolder.cs
- PersonalizationState.cs
- DataKeyCollection.cs
- XmlAnyElementAttribute.cs
- List.cs
- StylusPointDescription.cs
- RelationshipWrapper.cs
- ValueTypeFieldReference.cs
- MissingManifestResourceException.cs
- PolyBezierSegment.cs
- OutgoingWebRequestContext.cs
- NavigationEventArgs.cs
- DbXmlEnabledProviderManifest.cs
- SolidBrush.cs
- NativeMethodsCLR.cs
- PropertyDescriptor.cs
- ComponentConverter.cs
- GeneralTransform3D.cs
- PolicyException.cs
- CommentAction.cs
- EditorZone.cs
- Rights.cs
- Config.cs
- XMLSchema.cs
- PreApplicationStartMethodAttribute.cs
- PropertyInfo.cs
- ObjectViewQueryResultData.cs
- WinEventHandler.cs
- MouseActionConverter.cs
- BufferModeSettings.cs
- ForeignKeyConstraint.cs
- ClockGroup.cs
- Pen.cs
- TcpAppDomainProtocolHandler.cs
- RuntimeDelegateArgument.cs
- SQLBinaryStorage.cs
- Set.cs
- TabControlAutomationPeer.cs
- QuotedPrintableStream.cs
- SRGSCompiler.cs
- ManagementObjectSearcher.cs
- ControlCollection.cs
- UserControlDocumentDesigner.cs
- SortFieldComparer.cs
- HttpProfileBase.cs
- MessageDecoder.cs
- ToolStripDropDownItemDesigner.cs
- PersonalizableAttribute.cs
- StyleSelector.cs
- MouseCaptureWithinProperty.cs
- CompilerGeneratedAttribute.cs
- SchemaTypeEmitter.cs