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 / CodeDOM / CodeTypeDeclarationCollection.cs / 1 / CodeTypeDeclarationCollection.cs
// ------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// -----------------------------------------------------------------------------
//
namespace System.CodeDom {
using System;
using System.Collections;
using System.Runtime.InteropServices;
///
///
/// A collection that stores objects.
///
///
[
ClassInterface(ClassInterfaceType.AutoDispatch),
ComVisible(true),
Serializable,
]
public class CodeTypeDeclarationCollection : CollectionBase {
///
///
/// Initializes a new instance of .
///
///
public CodeTypeDeclarationCollection() {
}
///
///
/// Initializes a new instance of based on another .
///
///
public CodeTypeDeclarationCollection(CodeTypeDeclarationCollection value) {
this.AddRange(value);
}
///
///
/// Initializes a new instance of containing any array of objects.
///
///
public CodeTypeDeclarationCollection(CodeTypeDeclaration[] value) {
this.AddRange(value);
}
///
/// Represents the entry at the specified index of the .
///
public CodeTypeDeclaration this[int index] {
get {
return ((CodeTypeDeclaration)(List[index]));
}
set {
List[index] = value;
}
}
///
/// Adds a with the specified value to the
/// .
///
public int Add(CodeTypeDeclaration value) {
return List.Add(value);
}
///
/// Copies the elements of an array to the end of the .
///
public void AddRange(CodeTypeDeclaration[] value) {
if (value == null) {
throw new ArgumentNullException("value");
}
for (int i = 0; ((i) < (value.Length)); i = ((i) + (1))) {
this.Add(value[i]);
}
}
///
///
/// Adds the contents of another to the end of the collection.
///
///
public void AddRange(CodeTypeDeclarationCollection value) {
if (value == null) {
throw new ArgumentNullException("value");
}
int currentCount = value.Count;
for (int i = 0; i < currentCount; i = ((i) + (1))) {
this.Add(value[i]);
}
}
///
/// Gets a value indicating whether the
/// contains the specified .
///
public bool Contains(CodeTypeDeclaration value) {
return List.Contains(value);
}
///
/// Copies the values to a one-dimensional instance at the
/// specified index.
///
public void CopyTo(CodeTypeDeclaration[] array, int index) {
List.CopyTo(array, index);
}
///
/// Returns the index of a in
/// the .
///
public int IndexOf(CodeTypeDeclaration value) {
return List.IndexOf(value);
}
///
/// Inserts a into the at the specified index.
///
public void Insert(int index, CodeTypeDeclaration value) {
List.Insert(index, value);
}
///
/// Removes a specific from the
/// .
///
public void Remove(CodeTypeDeclaration value) {
List.Remove(value);
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// ------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// -----------------------------------------------------------------------------
//
namespace System.CodeDom {
using System;
using System.Collections;
using System.Runtime.InteropServices;
///
///
/// A collection that stores objects.
///
///
[
ClassInterface(ClassInterfaceType.AutoDispatch),
ComVisible(true),
Serializable,
]
public class CodeTypeDeclarationCollection : CollectionBase {
///
///
/// Initializes a new instance of .
///
///
public CodeTypeDeclarationCollection() {
}
///
///
/// Initializes a new instance of based on another .
///
///
public CodeTypeDeclarationCollection(CodeTypeDeclarationCollection value) {
this.AddRange(value);
}
///
///
/// Initializes a new instance of containing any array of objects.
///
///
public CodeTypeDeclarationCollection(CodeTypeDeclaration[] value) {
this.AddRange(value);
}
///
/// Represents the entry at the specified index of the .
///
public CodeTypeDeclaration this[int index] {
get {
return ((CodeTypeDeclaration)(List[index]));
}
set {
List[index] = value;
}
}
///
/// Adds a with the specified value to the
/// .
///
public int Add(CodeTypeDeclaration value) {
return List.Add(value);
}
///
/// Copies the elements of an array to the end of the .
///
public void AddRange(CodeTypeDeclaration[] value) {
if (value == null) {
throw new ArgumentNullException("value");
}
for (int i = 0; ((i) < (value.Length)); i = ((i) + (1))) {
this.Add(value[i]);
}
}
///
///
/// Adds the contents of another to the end of the collection.
///
///
public void AddRange(CodeTypeDeclarationCollection value) {
if (value == null) {
throw new ArgumentNullException("value");
}
int currentCount = value.Count;
for (int i = 0; i < currentCount; i = ((i) + (1))) {
this.Add(value[i]);
}
}
///
/// Gets a value indicating whether the
/// contains the specified .
///
public bool Contains(CodeTypeDeclaration value) {
return List.Contains(value);
}
///
/// Copies the values to a one-dimensional instance at the
/// specified index.
///
public void CopyTo(CodeTypeDeclaration[] array, int index) {
List.CopyTo(array, index);
}
///
/// Returns the index of a in
/// the .
///
public int IndexOf(CodeTypeDeclaration value) {
return List.IndexOf(value);
}
///
/// Inserts a into the at the specified index.
///
public void Insert(int index, CodeTypeDeclaration value) {
List.Insert(index, value);
}
///
/// Removes a specific from the
/// .
///
public void Remove(CodeTypeDeclaration value) {
List.Remove(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
- DataBinder.cs
- XappLauncher.cs
- BrowserDefinitionCollection.cs
- WSHttpSecurity.cs
- ColorPalette.cs
- NullableDecimalAverageAggregationOperator.cs
- InvalidAsynchronousStateException.cs
- ReachDocumentReferenceSerializerAsync.cs
- oledbmetadatacollectionnames.cs
- TransformGroup.cs
- AttachedPropertyDescriptor.cs
- AuthenticationModuleElementCollection.cs
- ComPersistableTypeElementCollection.cs
- XmlSchemaSimpleContentExtension.cs
- FormsAuthenticationUser.cs
- ToolStripLocationCancelEventArgs.cs
- ItemChangedEventArgs.cs
- FormattedTextSymbols.cs
- ToolbarAUtomationPeer.cs
- ConstantSlot.cs
- _BasicClient.cs
- TreeViewBindingsEditorForm.cs
- CommentAction.cs
- FocusTracker.cs
- DatePickerAutomationPeer.cs
- IsolatedStorageException.cs
- TreeNode.cs
- ProfileInfo.cs
- TrackingDataItemValue.cs
- HttpGetClientProtocol.cs
- TranslateTransform3D.cs
- MatrixKeyFrameCollection.cs
- RegionIterator.cs
- DbModificationCommandTree.cs
- MarkerProperties.cs
- PointHitTestResult.cs
- CellRelation.cs
- KeyboardEventArgs.cs
- RegexCapture.cs
- X509CertificateCollection.cs
- TrackBar.cs
- HwndHost.cs
- XmlBoundElement.cs
- DefaultTraceListener.cs
- FormsAuthenticationUser.cs
- httpserverutility.cs
- AppSecurityManager.cs
- XPathEmptyIterator.cs
- WindowsFormsSynchronizationContext.cs
- SegmentInfo.cs
- CheckBoxField.cs
- IsolatedStorageFile.cs
- UserControlCodeDomTreeGenerator.cs
- FontWeight.cs
- COM2ExtendedUITypeEditor.cs
- Page.cs
- SamlAuthenticationStatement.cs
- MatrixTransform.cs
- SortKey.cs
- OdbcRowUpdatingEvent.cs
- ObjectReaderCompiler.cs
- RuntimeArgumentHandle.cs
- CngKey.cs
- RegexCapture.cs
- Console.cs
- JumpItem.cs
- WebDisplayNameAttribute.cs
- WizardPanel.cs
- _TransmitFileOverlappedAsyncResult.cs
- Model3D.cs
- XmlTextReaderImplHelpers.cs
- QueryPageSettingsEventArgs.cs
- TreePrinter.cs
- WindowsListBox.cs
- MenuCommand.cs
- ClockGroup.cs
- TextEditorParagraphs.cs
- PolicyException.cs
- PanelStyle.cs
- XsdDateTime.cs
- DataRow.cs
- AlgoModule.cs
- IgnoreFlushAndCloseStream.cs
- ExpandableObjectConverter.cs
- BindingOperations.cs
- GridViewAutomationPeer.cs
- DefinitionBase.cs
- DetailsViewRow.cs
- CRYPTPROTECT_PROMPTSTRUCT.cs
- AssociationTypeEmitter.cs
- XmlTextAttribute.cs
- NodeCounter.cs
- XPathNodeIterator.cs
- LogRecordSequence.cs
- CodeSubDirectoriesCollection.cs
- Int16.cs
- StateFinalizationActivity.cs
- TemplateControl.cs
- WSDualHttpSecurityElement.cs
- PaintEvent.cs