Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Net / System / Net / NetworkInformation / UnicastIPAddressInformationCollection.cs / 1305376 / UnicastIPAddressInformationCollection.cs
using System.Collections.Generic; using System.Collections.ObjectModel; namespace System.Net.NetworkInformation{ public class UnicastIPAddressInformationCollection :ICollection{ Collection addresses = new Collection () ; protected internal UnicastIPAddressInformationCollection(){ } /// public virtual void CopyTo(UnicastIPAddressInformation[] 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(UnicastIPAddressInformation address) { throw new NotSupportedException(SR.GetString(SR.net_collection_readonly)); } internal void InternalAdd(UnicastIPAddressInformation address) { addresses.Add(address); } /// public virtual bool Contains(UnicastIPAddressInformation address) { return addresses.Contains(address); } System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { return this.GetEnumerator(); } public virtual IEnumerator GetEnumerator() { return (IEnumerator ) addresses.GetEnumerator(); } // Consider removing. public virtual UnicastIPAddressInformation this[int index] { get{ return (UnicastIPAddressInformation)addresses[index]; } } /// public virtual bool Remove(UnicastIPAddressInformation 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 UnicastIPAddressInformationCollection :ICollection { Collection addresses = new Collection () ; protected internal UnicastIPAddressInformationCollection(){ } /// public virtual void CopyTo(UnicastIPAddressInformation[] 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(UnicastIPAddressInformation address) { throw new NotSupportedException(SR.GetString(SR.net_collection_readonly)); } internal void InternalAdd(UnicastIPAddressInformation address) { addresses.Add(address); } /// public virtual bool Contains(UnicastIPAddressInformation address) { return addresses.Contains(address); } System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { return this.GetEnumerator(); } public virtual IEnumerator GetEnumerator() { return (IEnumerator ) addresses.GetEnumerator(); } // Consider removing. public virtual UnicastIPAddressInformation this[int index] { get{ return (UnicastIPAddressInformation)addresses[index]; } } /// public virtual bool Remove(UnicastIPAddressInformation 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
- _FtpControlStream.cs
- WebScriptEndpointElement.cs
- MaterialGroup.cs
- RegexCompiler.cs
- AesCryptoServiceProvider.cs
- CornerRadius.cs
- DebugView.cs
- ObjectAnimationUsingKeyFrames.cs
- HashAlgorithm.cs
- HighContrastHelper.cs
- FixedSOMElement.cs
- PageBuildProvider.cs
- HttpCacheVaryByContentEncodings.cs
- WhitespaceReader.cs
- ScriptingScriptResourceHandlerSection.cs
- XamlWrappingReader.cs
- PlainXmlWriter.cs
- Panel.cs
- OverrideMode.cs
- Matrix3DValueSerializer.cs
- Types.cs
- RootBrowserWindowProxy.cs
- PathFigureCollectionConverter.cs
- StandardCommands.cs
- TextTreeUndoUnit.cs
- LinqDataSourceUpdateEventArgs.cs
- AutoCompleteStringCollection.cs
- BaseParagraph.cs
- CollectionViewGroup.cs
- EnumerableCollectionView.cs
- ServiceChannelManager.cs
- ProgressiveCrcCalculatingStream.cs
- exports.cs
- documentsequencetextpointer.cs
- SapiRecoInterop.cs
- RectAnimationBase.cs
- AutomationPropertyInfo.cs
- FixedSOMPageConstructor.cs
- ProtectedConfigurationProviderCollection.cs
- SemanticResultValue.cs
- RawTextInputReport.cs
- Avt.cs
- Animatable.cs
- StringStorage.cs
- ServiceModelSectionGroup.cs
- SqlCrossApplyToCrossJoin.cs
- DynamicValueConverter.cs
- XmlCodeExporter.cs
- InputReport.cs
- SpecialNameAttribute.cs
- DynamicField.cs
- DelegatingConfigHost.cs
- _AuthenticationState.cs
- DataServiceKeyAttribute.cs
- TransformationRules.cs
- ProxyWebPartManager.cs
- HighContrastHelper.cs
- SingleAnimationUsingKeyFrames.cs
- DbModificationCommandTree.cs
- TableChangeProcessor.cs
- CounterNameConverter.cs
- Cursor.cs
- VectorCollectionValueSerializer.cs
- HttpDateParse.cs
- PlaceHolder.cs
- SoapBinding.cs
- Path.cs
- ProviderUtil.cs
- DeploymentSection.cs
- COM2ExtendedTypeConverter.cs
- IdentityReference.cs
- CleanUpVirtualizedItemEventArgs.cs
- DetailsViewInsertedEventArgs.cs
- OperationValidationEventArgs.cs
- CookieHandler.cs
- ReturnEventArgs.cs
- UnsafeNativeMethods.cs
- CollectionChangeEventArgs.cs
- Char.cs
- NullToBooleanConverter.cs
- Point3DIndependentAnimationStorage.cs
- SqlUnionizer.cs
- List.cs
- followingsibling.cs
- XmlFormatWriterGenerator.cs
- LinqDataSourceStatusEventArgs.cs
- Maps.cs
- XmlUtil.cs
- FixedSOMGroup.cs
- CatalogPart.cs
- ExpressionBuilder.cs
- TemplateBuilder.cs
- ItemDragEvent.cs
- SecurityCriticalDataForSet.cs
- RefreshEventArgs.cs
- MeasureItemEvent.cs
- WebRequest.cs
- SystemEvents.cs
- IntegerValidator.cs
- AccessibleObject.cs