Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / ndp / fx / src / Net / System / Net / NetworkInformation / IPAddressCollection.cs / 1 / 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 null; } 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 null; } 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
- TraceInternal.cs
- ProtocolElementCollection.cs
- ProgressChangedEventArgs.cs
- MouseGestureValueSerializer.cs
- CacheVirtualItemsEvent.cs
- WebPartAuthorizationEventArgs.cs
- ScrollProviderWrapper.cs
- PlacementWorkspace.cs
- Substitution.cs
- SqlUtils.cs
- CodeTypeConstructor.cs
- XamlSerializationHelper.cs
- BuilderPropertyEntry.cs
- RestClientProxyHandler.cs
- Rect3DConverter.cs
- CompilerResults.cs
- GridViewRow.cs
- dtdvalidator.cs
- TypeSystemHelpers.cs
- DataGridViewColumnCollection.cs
- PrivilegeNotHeldException.cs
- ContainerParaClient.cs
- ControlBuilderAttribute.cs
- ClientSettingsStore.cs
- ButtonBase.cs
- RecordManager.cs
- NotifyParentPropertyAttribute.cs
- DetailsViewUpdateEventArgs.cs
- WinEventTracker.cs
- StrongNameKeyPair.cs
- MembershipValidatePasswordEventArgs.cs
- CancellationToken.cs
- HtmlTableRow.cs
- EventLogPermissionAttribute.cs
- ObjectListItemCollection.cs
- GeneralTransform.cs
- Matrix.cs
- MruCache.cs
- MorphHelper.cs
- SafeBitVector32.cs
- TransformerTypeCollection.cs
- PackWebRequest.cs
- RenderingEventArgs.cs
- DesignerLoader.cs
- ResXResourceWriter.cs
- DetailsViewUpdatedEventArgs.cs
- PropertyChangeTracker.cs
- AssemblyAttributes.cs
- DoubleCollectionConverter.cs
- StringResourceManager.cs
- AppDomainCompilerProxy.cs
- VectorAnimationBase.cs
- ConnectionInterfaceCollection.cs
- ModelItemCollection.cs
- Int32AnimationUsingKeyFrames.cs
- ProcessHostServerConfig.cs
- CacheHelper.cs
- XmlEventCache.cs
- Assert.cs
- TripleDES.cs
- PrimitiveRenderer.cs
- RadioButton.cs
- UIntPtr.cs
- NameValuePair.cs
- Soap12ProtocolImporter.cs
- OpCopier.cs
- TypedRowGenerator.cs
- XPathNode.cs
- ObjectAssociationEndMapping.cs
- StickyNoteContentControl.cs
- WebPartConnectionsConnectVerb.cs
- DesignerAutoFormatStyle.cs
- PageEventArgs.cs
- AssemblySettingAttributes.cs
- ControllableStoryboardAction.cs
- UInt32Storage.cs
- MetadataArtifactLoaderFile.cs
- SwitchElementsCollection.cs
- LazyInitializer.cs
- dbenumerator.cs
- XmlTextReader.cs
- NavigationProgressEventArgs.cs
- DiscoveryCallbackBehavior.cs
- TogglePatternIdentifiers.cs
- XmlSchemaImport.cs
- ValueCollectionParameterReader.cs
- SoapElementAttribute.cs
- OdbcConnection.cs
- ImageAttributes.cs
- RemotingService.cs
- PasswordRecovery.cs
- QueryableFilterRepeater.cs
- SqlNamer.cs
- ServerValidateEventArgs.cs
- TypeTypeConverter.cs
- Relationship.cs
- SerializationStore.cs
- DbProviderFactory.cs
- EntityProxyTypeInfo.cs
- TimeSpanStorage.cs