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 / 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
- OrderPreservingPipeliningMergeHelper.cs
- MapPathBasedVirtualPathProvider.cs
- MarkerProperties.cs
- ListViewSortEventArgs.cs
- InkCanvasFeedbackAdorner.cs
- SchemaMerger.cs
- DataFormat.cs
- XmlValueConverter.cs
- PixelShader.cs
- TextElement.cs
- TriggerAction.cs
- SubstitutionDesigner.cs
- XamlTreeBuilder.cs
- BitmapImage.cs
- UnmanagedMemoryStreamWrapper.cs
- UnicodeEncoding.cs
- TextEndOfParagraph.cs
- DoubleLink.cs
- Double.cs
- Base64Decoder.cs
- Region.cs
- ProjectionPlanCompiler.cs
- SystemSounds.cs
- PageVisual.cs
- WasHttpModulesInstallComponent.cs
- TableItemPatternIdentifiers.cs
- ExpressionBuilderContext.cs
- DataGridViewRowsAddedEventArgs.cs
- VisualProxy.cs
- HtmlGenericControl.cs
- UriTemplateTrieLocation.cs
- StructuredTypeEmitter.cs
- ScriptManager.cs
- ToolStripSettings.cs
- Processor.cs
- WizardSideBarListControlItem.cs
- GeometryGroup.cs
- DispatcherBuilder.cs
- DocumentPaginator.cs
- TouchEventArgs.cs
- TypeConverterHelper.cs
- HtmlTernaryTree.cs
- DataIdProcessor.cs
- ConnectionStringsExpressionEditor.cs
- SynchronizationLockException.cs
- DrawingImage.cs
- HandleRef.cs
- DataGridViewCell.cs
- _SafeNetHandles.cs
- TextOptions.cs
- ColorAnimationUsingKeyFrames.cs
- SmtpAuthenticationManager.cs
- OutputCacheProfileCollection.cs
- TextParaClient.cs
- Parallel.cs
- DataGridTableCollection.cs
- IxmlLineInfo.cs
- WebMethodAttribute.cs
- StringAnimationBase.cs
- WebPartChrome.cs
- ViewGenResults.cs
- FillErrorEventArgs.cs
- EncryptedReference.cs
- PolyQuadraticBezierSegmentFigureLogic.cs
- Adorner.cs
- FloaterParagraph.cs
- FirewallWrapper.cs
- ConfigurationCollectionAttribute.cs
- DataGridViewHeaderCell.cs
- TypeElementCollection.cs
- TagPrefixInfo.cs
- AuthenticatingEventArgs.cs
- RangeValueProviderWrapper.cs
- DataServiceRequestOfT.cs
- CompilationRelaxations.cs
- PeerPresenceInfo.cs
- ItemsControl.cs
- LinqToSqlWrapper.cs
- ConfigXmlComment.cs
- FlowLayout.cs
- COM2ExtendedUITypeEditor.cs
- ExclusiveTcpTransportManager.cs
- ImageAnimator.cs
- AspCompat.cs
- FixedDocumentPaginator.cs
- AssemblyCache.cs
- ResourcePool.cs
- Stroke2.cs
- ScriptManagerProxy.cs
- GCHandleCookieTable.cs
- OperationContractAttribute.cs
- HyperLinkDesigner.cs
- BindingExpressionUncommonField.cs
- WindowsUserNameCachingSecurityTokenAuthenticator.cs
- NetSectionGroup.cs
- CultureTableRecord.cs
- SecurityContext.cs
- GetKeyedHashRequest.cs
- CompilationSection.cs
- Cursor.cs