Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Net / System / Net / NetworkInformation / ipaddressinformationcollection.cs / 1305376 / ipaddressinformationcollection.cs
using System.Collections.Generic; using System.Collections.ObjectModel; namespace System.Net.NetworkInformation{ public class IPAddressInformationCollection :ICollection{ Collection addresses = new Collection (); internal IPAddressInformationCollection(){ } /// public virtual void CopyTo(IPAddressInformation[] array, int offset) { addresses.CopyTo(array,offset); } /// public virtual int Count { get { return addresses.Count; } } public virtual bool IsReadOnly { get { return true; } } /// public virtual void Add(IPAddressInformation address) { throw new NotSupportedException(SR.GetString(SR.net_collection_readonly)); } internal void InternalAdd(IPAddressInformation address) { addresses.Add(address); } /// public virtual bool Contains(IPAddressInformation address) { return addresses.Contains(address); } System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { return this.GetEnumerator(); } public virtual IEnumerator GetEnumerator() { return (IEnumerator ) addresses.GetEnumerator(); } public virtual IPAddressInformation this[int index] { get{ return (IPAddressInformation)addresses[index]; } } /// public virtual bool Remove(IPAddressInformation address) { throw new NotSupportedException(SR.GetString(SR.net_collection_readonly)); } /// public virtual void Clear() { throw new NotSupportedException(SR.GetString(SR.net_collection_readonly)); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. using System.Collections.Generic; using System.Collections.ObjectModel; namespace System.Net.NetworkInformation{ public class IPAddressInformationCollection :ICollection { Collection addresses = new Collection (); internal IPAddressInformationCollection(){ } /// public virtual void CopyTo(IPAddressInformation[] array, int offset) { addresses.CopyTo(array,offset); } /// public virtual int Count { get { return addresses.Count; } } public virtual bool IsReadOnly { get { return true; } } /// public virtual void Add(IPAddressInformation address) { throw new NotSupportedException(SR.GetString(SR.net_collection_readonly)); } internal void InternalAdd(IPAddressInformation address) { addresses.Add(address); } /// public virtual bool Contains(IPAddressInformation address) { return addresses.Contains(address); } System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { return this.GetEnumerator(); } public virtual IEnumerator GetEnumerator() { return (IEnumerator ) addresses.GetEnumerator(); } public virtual IPAddressInformation this[int index] { get{ return (IPAddressInformation)addresses[index]; } } /// public virtual bool Remove(IPAddressInformation address) { throw new NotSupportedException(SR.GetString(SR.net_collection_readonly)); } /// public virtual void Clear() { throw new NotSupportedException(SR.GetString(SR.net_collection_readonly)); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- SubpageParaClient.cs
- PolicyAssertionCollection.cs
- StandardOleMarshalObject.cs
- FamilyTypefaceCollection.cs
- SystemKeyConverter.cs
- TabControlCancelEvent.cs
- LicFileLicenseProvider.cs
- XmlILIndex.cs
- ProcessModuleDesigner.cs
- FileIOPermission.cs
- _ConnectStream.cs
- BufferedOutputStream.cs
- OleDbException.cs
- RegistrySecurity.cs
- LinearQuaternionKeyFrame.cs
- XmlDeclaration.cs
- MissingMethodException.cs
- Clipboard.cs
- ProcessThread.cs
- OperationCanceledException.cs
- EntityDataSourceView.cs
- HostVisual.cs
- SqlInternalConnectionTds.cs
- ImportCatalogPart.cs
- SiteMapHierarchicalDataSourceView.cs
- StringSource.cs
- BlockingCollection.cs
- UrlEncodedParameterWriter.cs
- RowParagraph.cs
- CustomValidator.cs
- WsdlEndpointConversionContext.cs
- DecimalConstantAttribute.cs
- XmlCharCheckingWriter.cs
- SystemResources.cs
- OdbcFactory.cs
- HttpFileCollectionWrapper.cs
- HwndSubclass.cs
- ControlParameter.cs
- ThemeDictionaryExtension.cs
- XpsFixedDocumentReaderWriter.cs
- PointAnimationClockResource.cs
- CodeCompileUnit.cs
- ReversePositionQuery.cs
- HwndSourceKeyboardInputSite.cs
- TypeName.cs
- ParameterToken.cs
- oledbmetadatacollectionnames.cs
- PackagingUtilities.cs
- AsyncWaitHandle.cs
- ClientProxyGenerator.cs
- HotSpotCollection.cs
- TextSelectionProcessor.cs
- InvokeBase.cs
- PointLight.cs
- DiscreteKeyFrames.cs
- CollectionDataContract.cs
- ToolStripItemRenderEventArgs.cs
- DataTableMappingCollection.cs
- GridViewRowEventArgs.cs
- PeerApplicationLaunchInfo.cs
- XmlUrlResolver.cs
- RowUpdatedEventArgs.cs
- FullTextBreakpoint.cs
- SessionStateSection.cs
- Frame.cs
- GeometryDrawing.cs
- PathGeometry.cs
- PropertyItemInternal.cs
- Avt.cs
- HierarchicalDataSourceControl.cs
- TaskFormBase.cs
- CodeBlockBuilder.cs
- FilterQuery.cs
- StagingAreaInputItem.cs
- HatchBrush.cs
- Int16Converter.cs
- WorkflowViewElement.cs
- SafeArrayTypeMismatchException.cs
- EventToken.cs
- DynamicRenderer.cs
- HwndSource.cs
- HostingPreferredMapPath.cs
- NullableDecimalSumAggregationOperator.cs
- DesignerActionVerbItem.cs
- Rule.cs
- OuterGlowBitmapEffect.cs
- HistoryEventArgs.cs
- PropertyChangedEventArgs.cs
- HtmlFormWrapper.cs
- CodeTypeDelegate.cs
- SecurityBindingElement.cs
- ContextMenuAutomationPeer.cs
- WebPartHelpVerb.cs
- NetworkCredential.cs
- Rotation3D.cs
- ClientSettingsProvider.cs
- BitConverter.cs
- TreeNodeCollection.cs
- Underline.cs
- PeerContact.cs