Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / ndp / fx / src / Net / System / Net / NetworkInformation / ipaddressinformationcollection.cs / 1 / 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 null; } 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 null; } 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
- LineInfo.cs
- ContextStack.cs
- EventToken.cs
- PcmConverter.cs
- DbCommandDefinition.cs
- IconConverter.cs
- LineInfo.cs
- GridProviderWrapper.cs
- DataGridItem.cs
- PersonalizationEntry.cs
- ActivityDesigner.cs
- ValidationError.cs
- ColorMap.cs
- EndpointDiscoveryBehavior.cs
- BrowserCapabilitiesFactoryBase.cs
- DataGridViewElement.cs
- EventLogQuery.cs
- Bidi.cs
- SingleStorage.cs
- MimeReturn.cs
- OptionalColumn.cs
- Clock.cs
- XmlArrayAttribute.cs
- XmlUnspecifiedAttribute.cs
- Tag.cs
- DbMetaDataCollectionNames.cs
- OleDbTransaction.cs
- CredentialCache.cs
- FormViewDeletedEventArgs.cs
- DateTimeParse.cs
- BinaryMethodMessage.cs
- GraphicsState.cs
- Path.cs
- EditorPartCollection.cs
- XmlDocumentSerializer.cs
- DrawingBrush.cs
- ClientRoleProvider.cs
- StickyNoteHelper.cs
- LineUtil.cs
- EndPoint.cs
- EllipticalNodeOperations.cs
- UserControlParser.cs
- ArrayExtension.cs
- DependencyObjectType.cs
- WindowHideOrCloseTracker.cs
- SEHException.cs
- PriorityRange.cs
- webeventbuffer.cs
- DeclarativeCatalogPart.cs
- _NTAuthentication.cs
- SqlDataSourceView.cs
- RemoteWebConfigurationHostStream.cs
- SqlCacheDependencyDatabaseCollection.cs
- Hash.cs
- StateDesigner.Layouts.cs
- ItemMap.cs
- __Error.cs
- DrawTreeNodeEventArgs.cs
- JsonFormatWriterGenerator.cs
- Privilege.cs
- HostingEnvironment.cs
- ISCIIEncoding.cs
- X509PeerCertificateAuthentication.cs
- InstanceOwnerQueryResult.cs
- MemberInfoSerializationHolder.cs
- SqlBooleanizer.cs
- BamlResourceContent.cs
- CodeDefaultValueExpression.cs
- ManagedWndProcTracker.cs
- XmlAttributeCache.cs
- InputScope.cs
- NativeRecognizer.cs
- ColumnResizeUndoUnit.cs
- UserControlParser.cs
- InstanceNotReadyException.cs
- WindowsGraphics.cs
- WorkflowViewElement.cs
- DecoderBestFitFallback.cs
- WindowsSpinner.cs
- NotFiniteNumberException.cs
- XmlSubtreeReader.cs
- TypeCollectionPropertyEditor.cs
- CustomAttributeBuilder.cs
- ExpressionPrefixAttribute.cs
- WindowsPrincipal.cs
- DefinitionUpdate.cs
- GrammarBuilderPhrase.cs
- CompositeControl.cs
- assertwrapper.cs
- DataTableClearEvent.cs
- _ReceiveMessageOverlappedAsyncResult.cs
- DataColumnChangeEvent.cs
- ActiveXHelper.cs
- TrimSurroundingWhitespaceAttribute.cs
- StatusBarPanelClickEvent.cs
- WindowsListViewItemCheckBox.cs
- UnsafeNetInfoNativeMethods.cs
- ExtractedStateEntry.cs
- SmiTypedGetterSetter.cs
- altserialization.cs