Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / ndp / fx / src / CompMod / System / ComponentModel / AddingNewEventArgs.cs / 1 / AddingNewEventArgs.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
namespace System.ComponentModel {
using System;
using System.ComponentModel;
using System.Security.Permissions;
///
/// Provides data for an event that signals the adding of a new object
/// to a list, allowing any event handler to supply the new object. If
/// no event handler supplies a new object to use, the list should create
/// one itself.
///
[HostProtection(SharedState = true)]
public class AddingNewEventArgs : EventArgs
{
private object newObject = null;
///
/// Initializes a new instance of the class,
/// with no new object defined.
///
public AddingNewEventArgs() : base() {
}
///
/// Initializes a new instance of the class,
/// with the specified object defined as the default new object.
///
public AddingNewEventArgs(object newObject) : base() {
this.newObject = newObject;
}
///
/// Gets or sets the new object that will be added to the list.
///
public object NewObject {
get {
return newObject;
}
set {
newObject = value;
}
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
namespace System.ComponentModel {
using System;
using System.ComponentModel;
using System.Security.Permissions;
///
/// Provides data for an event that signals the adding of a new object
/// to a list, allowing any event handler to supply the new object. If
/// no event handler supplies a new object to use, the list should create
/// one itself.
///
[HostProtection(SharedState = true)]
public class AddingNewEventArgs : EventArgs
{
private object newObject = null;
///
/// Initializes a new instance of the class,
/// with no new object defined.
///
public AddingNewEventArgs() : base() {
}
///
/// Initializes a new instance of the class,
/// with the specified object defined as the default new object.
///
public AddingNewEventArgs(object newObject) : base() {
this.newObject = newObject;
}
///
/// Gets or sets the new object that will be added to the list.
///
public object NewObject {
get {
return newObject;
}
set {
newObject = value;
}
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- CreateUserWizard.cs
- RawStylusInputCustomData.cs
- _AutoWebProxyScriptEngine.cs
- UnsafeNativeMethods.cs
- DeferredElementTreeState.cs
- SecurityKeyIdentifierClause.cs
- Stack.cs
- EndOfStreamException.cs
- DmlSqlGenerator.cs
- _TransmitFileOverlappedAsyncResult.cs
- _Connection.cs
- SqlNotificationRequest.cs
- NumericExpr.cs
- StagingAreaInputItem.cs
- FixedDocument.cs
- RubberbandSelector.cs
- CreateParams.cs
- WinFormsSecurity.cs
- TrackingCondition.cs
- BamlRecordHelper.cs
- LeaseManager.cs
- Root.cs
- ConstNode.cs
- PropertyItemInternal.cs
- XmlDigitalSignatureProcessor.cs
- ColorMap.cs
- DesignTimeResourceProviderFactoryAttribute.cs
- BitmapEffectInputData.cs
- RepeatBehavior.cs
- Html32TextWriter.cs
- XmlSerializerSection.cs
- MailHeaderInfo.cs
- InteropEnvironment.cs
- WindowsIdentity.cs
- MessageEventSubscriptionService.cs
- ProtocolElement.cs
- ValueConversionAttribute.cs
- DoubleUtil.cs
- ApplicationException.cs
- RuleInfoComparer.cs
- XPathNodeHelper.cs
- XLinq.cs
- RootBrowserWindowProxy.cs
- XmlAttributes.cs
- TextElementCollection.cs
- DbDataReader.cs
- WinFormsUtils.cs
- Stopwatch.cs
- Input.cs
- EndpointDiscoveryElement.cs
- ImageList.cs
- ExtentKey.cs
- PageBuildProvider.cs
- StringKeyFrameCollection.cs
- DataGridViewMethods.cs
- RepeatBehaviorConverter.cs
- COM2ColorConverter.cs
- CallbackHandler.cs
- TableLayoutColumnStyleCollection.cs
- MarginsConverter.cs
- StateValidator.cs
- UidManager.cs
- SubpageParaClient.cs
- Pens.cs
- RichTextBoxAutomationPeer.cs
- OutgoingWebRequestContext.cs
- Pen.cs
- BinaryObjectInfo.cs
- CreateParams.cs
- ClientConfigurationHost.cs
- IncomingWebResponseContext.cs
- LogWriteRestartAreaAsyncResult.cs
- SystemInfo.cs
- LogRecordSequence.cs
- ThicknessKeyFrameCollection.cs
- SoapRpcMethodAttribute.cs
- NativeMethodsCLR.cs
- SelectionHighlightInfo.cs
- IdentifierService.cs
- FilePrompt.cs
- DictionarySectionHandler.cs
- RowTypeElement.cs
- DataControlPagerLinkButton.cs
- remotingproxy.cs
- SBCSCodePageEncoding.cs
- BitmapEffectGeneralTransform.cs
- SqlProvider.cs
- DefaultPropertyAttribute.cs
- SortedDictionary.cs
- ProviderUtil.cs
- ErrorStyle.cs
- CodeCatchClause.cs
- HeaderedContentControl.cs
- ChildTable.cs
- RichTextBox.cs
- WindowsEditBox.cs
- XmlDataSourceView.cs
- PerformanceCountersElement.cs
- ListView.cs
- FixedFindEngine.cs