Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / CompMod / System / CodeDOM / CodeTypeReferenceCollection.cs / 1305376 / CodeTypeReferenceCollection.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 CodeTypeReferenceCollection : CollectionBase {
///
///
/// Initializes a new instance of .
///
///
public CodeTypeReferenceCollection() {
}
///
///
/// Initializes a new instance of based on another .
///
///
public CodeTypeReferenceCollection(CodeTypeReferenceCollection value) {
this.AddRange(value);
}
///
///
/// Initializes a new instance of containing any array of objects.
///
///
public CodeTypeReferenceCollection(CodeTypeReference[] value) {
this.AddRange(value);
}
///
/// Represents the entry at the specified index of the .
///
public CodeTypeReference this[int index] {
get {
return ((CodeTypeReference)(List[index]));
}
set {
List[index] = value;
}
}
///
/// Adds a with the specified value to the
/// .
///
public int Add(CodeTypeReference value) {
return List.Add(value);
}
///
/// [To be supplied.]
///
public void Add(string value) {
Add(new CodeTypeReference(value));
}
///
/// [To be supplied.]
///
public void Add(Type value) {
Add(new CodeTypeReference(value));
}
///
/// Copies the elements of an array to the end of the .
///
public void AddRange(CodeTypeReference[] 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(CodeTypeReferenceCollection 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(CodeTypeReference value) {
return List.Contains(value);
}
///
/// Copies the values to a one-dimensional instance at the
/// specified index.
///
public void CopyTo(CodeTypeReference[] array, int index) {
List.CopyTo(array, index);
}
///
/// Returns the index of a in
/// the .
///
public int IndexOf(CodeTypeReference value) {
return List.IndexOf(value);
}
///
/// Inserts a into the at the specified index.
///
public void Insert(int index, CodeTypeReference value) {
List.Insert(index, value);
}
///
/// Removes a specific from the
/// .
///
public void Remove(CodeTypeReference 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
- WebPartsSection.cs
- Label.cs
- CanonicalXml.cs
- TemplateControl.cs
- PropertyEntry.cs
- DecoderFallbackWithFailureFlag.cs
- MutexSecurity.cs
- BamlRecordWriter.cs
- ObjectCloneHelper.cs
- NamespaceListProperty.cs
- PeerName.cs
- ResXDataNode.cs
- Int32Rect.cs
- EntityModelBuildProvider.cs
- IOException.cs
- NavigationEventArgs.cs
- securitymgrsite.cs
- DBCommandBuilder.cs
- SiteMapNode.cs
- SecurityCookieModeValidator.cs
- Focus.cs
- HtmlAnchor.cs
- CompareValidator.cs
- FileDialogCustomPlace.cs
- UnsafeNativeMethods.cs
- RemoveStoryboard.cs
- DateBoldEvent.cs
- StructuredTypeInfo.cs
- SingleConverter.cs
- ConfigXmlCDataSection.cs
- PartDesigner.cs
- InertiaRotationBehavior.cs
- CodeIdentifiers.cs
- TextEditor.cs
- InstancePersistenceCommandException.cs
- GridItemCollection.cs
- WebPartAuthorizationEventArgs.cs
- HttpPostedFile.cs
- SmiRequestExecutor.cs
- StdValidatorsAndConverters.cs
- oledbconnectionstring.cs
- HttpCapabilitiesBase.cs
- AlternateView.cs
- CollectionMarkupSerializer.cs
- DoubleAverageAggregationOperator.cs
- DataProtection.cs
- HttpCapabilitiesBase.cs
- XmlBinaryReader.cs
- GC.cs
- DataGridViewCellToolTipTextNeededEventArgs.cs
- DiagnosticStrings.cs
- _FtpControlStream.cs
- EditBehavior.cs
- ExceptionHandler.cs
- DBSqlParserColumnCollection.cs
- TableItemStyle.cs
- RawUIStateInputReport.cs
- SqlMultiplexer.cs
- Header.cs
- DesignerHost.cs
- OLEDB_Util.cs
- TextModifierScope.cs
- TextOptionsInternal.cs
- IODescriptionAttribute.cs
- DataObject.cs
- XmlWriterTraceListener.cs
- AssemblyAssociatedContentFileAttribute.cs
- ListBindingConverter.cs
- ExternalCalls.cs
- SocketStream.cs
- SiteMapDataSource.cs
- SequentialWorkflowHeaderFooter.cs
- WebServiceData.cs
- DocumentAutomationPeer.cs
- CrossAppDomainChannel.cs
- FixedSOMFixedBlock.cs
- WSSecureConversationDec2005.cs
- CodeMemberEvent.cs
- EpmSyndicationContentSerializer.cs
- HttpModuleCollection.cs
- MetabaseSettings.cs
- ComponentResourceKey.cs
- ClientRoleProvider.cs
- xmlsaver.cs
- StringBuilder.cs
- SimpleWebHandlerParser.cs
- SSmlParser.cs
- FilterElement.cs
- _AutoWebProxyScriptWrapper.cs
- FileLogRecordStream.cs
- ConfigXmlText.cs
- StylesEditorDialog.cs
- TableLayoutStyleCollection.cs
- BindingManagerDataErrorEventArgs.cs
- DragCompletedEventArgs.cs
- Form.cs
- StylusCaptureWithinProperty.cs
- SqlDataSourceView.cs
- CompositeControl.cs
- TreeViewCancelEvent.cs