Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Net / System / Net / NetworkInformation / IPAddressCollection.cs / 1305376 / IPAddressCollection.cs
using System.Collections.Generic; using System.Collections.ObjectModel; namespace System.Net.NetworkInformation{ public class IPAddressCollection :ICollection{ Collection addresses = new Collection (); protected internal IPAddressCollection(){ } /// public virtual void CopyTo(IPAddress[] 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(IPAddress address) { throw new NotSupportedException(SR.GetString(SR.net_collection_readonly)); } internal void InternalAdd(IPAddress address) { addresses.Add(address); } /// public virtual bool Contains(IPAddress 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 IPAddress this[int index] { get{ return (IPAddress)addresses[index]; } } /// public virtual bool Remove(IPAddress 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 IPAddressCollection :ICollection { Collection addresses = new Collection (); protected internal IPAddressCollection(){ } /// public virtual void CopyTo(IPAddress[] 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(IPAddress address) { throw new NotSupportedException(SR.GetString(SR.net_collection_readonly)); } internal void InternalAdd(IPAddress address) { addresses.Add(address); } /// public virtual bool Contains(IPAddress 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 IPAddress this[int index] { get{ return (IPAddress)addresses[index]; } } /// public virtual bool Remove(IPAddress 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
- InvalidateEvent.cs
- EndPoint.cs
- PropertyCondition.cs
- RuntimeWrappedException.cs
- WebProxyScriptElement.cs
- smtppermission.cs
- WebBrowserBase.cs
- ResolveDuplexAsyncResult.cs
- SHA1.cs
- PolyLineSegment.cs
- SystemException.cs
- InheritanceUI.cs
- CellTreeNodeVisitors.cs
- CloseCollectionAsyncResult.cs
- TextPenaltyModule.cs
- EventProxy.cs
- coordinatorscratchpad.cs
- HostingEnvironment.cs
- StaticFileHandler.cs
- RootBrowserWindowProxy.cs
- GACMembershipCondition.cs
- NumberFormatter.cs
- SelectionRange.cs
- HttpServerUtilityBase.cs
- XmlMembersMapping.cs
- InputMethod.cs
- BamlRecordWriter.cs
- CompositeFontInfo.cs
- DSASignatureFormatter.cs
- DataMemberListEditor.cs
- EditorPart.cs
- Zone.cs
- TextTreeNode.cs
- XmlTypeMapping.cs
- SafeEventLogReadHandle.cs
- UIAgentRequest.cs
- HyperLinkColumn.cs
- TransportConfigurationTypeElement.cs
- PathFigureCollection.cs
- IteratorFilter.cs
- TrackingAnnotationCollection.cs
- CacheDict.cs
- GradientBrush.cs
- SystemIPInterfaceStatistics.cs
- QueryReaderSettings.cs
- DataKeyCollection.cs
- XmlDigitalSignatureProcessor.cs
- DataGridViewCellToolTipTextNeededEventArgs.cs
- FileSystemInfo.cs
- LinqDataSourceHelper.cs
- FileIOPermission.cs
- SqlExpressionNullability.cs
- DynamicResourceExtensionConverter.cs
- CookieProtection.cs
- initElementDictionary.cs
- StickyNoteAnnotations.cs
- DesignTimeTemplateParser.cs
- ParseNumbers.cs
- ColorIndependentAnimationStorage.cs
- AssemblyCollection.cs
- TreeNodeStyle.cs
- SkinIDTypeConverter.cs
- BulletedListEventArgs.cs
- TreeViewEvent.cs
- AppModelKnownContentFactory.cs
- InternalEnumValidator.cs
- Thickness.cs
- SqlInternalConnectionSmi.cs
- XmlChildNodes.cs
- Dynamic.cs
- Model3D.cs
- XmlSchemaElement.cs
- NativeMethods.cs
- OdbcConnectionOpen.cs
- ColumnClickEvent.cs
- Expr.cs
- CodeIdentifier.cs
- FixedSOMSemanticBox.cs
- ProgressiveCrcCalculatingStream.cs
- PrimarySelectionAdorner.cs
- Profiler.cs
- BinaryFormatterSinks.cs
- OLEDB_Util.cs
- ContractSearchPattern.cs
- MessageDecoder.cs
- ScriptReferenceEventArgs.cs
- GridViewRowEventArgs.cs
- HostedHttpTransportManager.cs
- MaskedTextProvider.cs
- DetailsViewInsertEventArgs.cs
- WindowsNonControl.cs
- ExtensibleClassFactory.cs
- HttpProtocolImporter.cs
- CodeTypeReferenceSerializer.cs
- AutoResetEvent.cs
- SQLString.cs
- XmlDownloadManager.cs
- GrammarBuilderPhrase.cs
- BridgeDataReader.cs
- TailCallAnalyzer.cs