Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- AttachedPropertyBrowsableWhenAttributePresentAttribute.cs
- WeakReadOnlyCollection.cs
- SolidColorBrush.cs
- ChameleonKey.cs
- XmlDataContract.cs
- ContextStaticAttribute.cs
- XPathScanner.cs
- AsyncResult.cs
- MessageEventSubscriptionService.cs
- InvalidEnumArgumentException.cs
- SoapObjectInfo.cs
- SecureEnvironment.cs
- OutputCacheModule.cs
- XmlCountingReader.cs
- GridProviderWrapper.cs
- DataChangedEventManager.cs
- Resources.Designer.cs
- unsafeIndexingFilterStream.cs
- PermissionToken.cs
- UIElementIsland.cs
- ApplicationSecurityManager.cs
- CheckBoxRenderer.cs
- AspNetRouteServiceHttpHandler.cs
- ParameterCollectionEditorForm.cs
- AssemblyResourceLoader.cs
- PageFunction.cs
- InvalidChannelBindingException.cs
- ClassicBorderDecorator.cs
- FigureParagraph.cs
- CharacterMetricsDictionary.cs
- SafeNativeMethods.cs
- ImageButton.cs
- WebEvents.cs
- PeerApplicationLaunchInfo.cs
- CreateUserWizardDesigner.cs
- BinaryConverter.cs
- AesManaged.cs
- WebEvents.cs
- ThreadAbortException.cs
- CodeSnippetCompileUnit.cs
- DesignerSerializationOptionsAttribute.cs
- SmtpReplyReaderFactory.cs
- TextPatternIdentifiers.cs
- HtmlInputText.cs
- DataContract.cs
- HtmlTable.cs
- WorkflowEventArgs.cs
- CmsUtils.cs
- EtwTrace.cs
- Image.cs
- ToolBar.cs
- SymbolMethod.cs
- PeerUnsafeNativeCryptMethods.cs
- DataGridViewCellStyleConverter.cs
- ScrollPattern.cs
- ThicknessKeyFrameCollection.cs
- ILGenerator.cs
- DropSource.cs
- CacheMemory.cs
- SoapExtensionTypeElementCollection.cs
- CodeBlockBuilder.cs
- SerializableTypeCodeDomSerializer.cs
- HatchBrush.cs
- Interlocked.cs
- SuppressMergeCheckAttribute.cs
- DesignerOptionService.cs
- BitmapEffect.cs
- AttributeEmitter.cs
- HttpProxyCredentialType.cs
- PositiveTimeSpanValidator.cs
- ListControlBuilder.cs
- Trace.cs
- SymbolTable.cs
- ParamArrayAttribute.cs
- ArgumentNullException.cs
- DataServiceStreamProviderWrapper.cs
- WorkflowDesignerColors.cs
- ProgressChangedEventArgs.cs
- ConditionalAttribute.cs
- PermissionSet.cs
- SingleObjectCollection.cs
- SqlBulkCopyColumnMapping.cs
- UTF8Encoding.cs
- BorderSidesEditor.cs
- UIInitializationException.cs
- RuntimeConfigLKG.cs
- ParentQuery.cs
- WindowsListViewGroup.cs
- SQLDecimal.cs
- ViewBase.cs
- WebPartMenu.cs
- DataReaderContainer.cs
- FailedToStartupUIException.cs
- EntityParameter.cs
- StructuralObject.cs
- ColorKeyFrameCollection.cs
- COM2ExtendedUITypeEditor.cs
- Byte.cs
- DataGridViewCellToolTipTextNeededEventArgs.cs
- WithStatement.cs