Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- WindowsTreeView.cs
- WindowsFormsHostPropertyMap.cs
- DesigntimeLicenseContext.cs
- PointConverter.cs
- SynchronizedInputProviderWrapper.cs
- LayoutSettings.cs
- InlineUIContainer.cs
- ListViewItem.cs
- ContextStaticAttribute.cs
- PagedDataSource.cs
- SlipBehavior.cs
- DynamicRenderer.cs
- TypeValidationEventArgs.cs
- ListViewTableCell.cs
- AmbientLight.cs
- HybridDictionary.cs
- TimeoutValidationAttribute.cs
- DetailsViewDesigner.cs
- ListSortDescriptionCollection.cs
- InteropAutomationProvider.cs
- MsmqIntegrationElement.cs
- XmlSchemaChoice.cs
- SqlDependencyUtils.cs
- AddInControllerImpl.cs
- BindingUtils.cs
- HitTestWithPointDrawingContextWalker.cs
- DataGridTableCollection.cs
- LowerCaseStringConverter.cs
- RuleProcessor.cs
- ItemCollection.cs
- SqlColumnizer.cs
- CalendarKeyboardHelper.cs
- BlockUIContainer.cs
- WebServiceTypeData.cs
- EventMap.cs
- RectangleGeometry.cs
- BasicHttpSecurityMode.cs
- WrappingXamlSchemaContext.cs
- XmlAttributeCollection.cs
- AlgoModule.cs
- ColumnTypeConverter.cs
- EFTableProvider.cs
- CompositeFontInfo.cs
- ThreadExceptionDialog.cs
- SchemaElement.cs
- UnionCodeGroup.cs
- CallId.cs
- Model3DGroup.cs
- SqlTriggerContext.cs
- SafeSystemMetrics.cs
- SQLInt16Storage.cs
- RenderData.cs
- HttpListenerException.cs
- SqlClientWrapperSmiStream.cs
- ScriptIgnoreAttribute.cs
- SmiMetaData.cs
- GeneralTransform3DTo2D.cs
- AncillaryOps.cs
- WrapPanel.cs
- XmlSchemaObjectTable.cs
- Composition.cs
- StorageMappingItemLoader.cs
- URIFormatException.cs
- OpenCollectionAsyncResult.cs
- ArcSegment.cs
- ColorConvertedBitmap.cs
- StringValueConverter.cs
- WebPermission.cs
- OletxVolatileEnlistment.cs
- SQLDecimal.cs
- Module.cs
- ParseElement.cs
- DataMisalignedException.cs
- XmlSchemaImport.cs
- QueryTaskGroupState.cs
- ObjectAssociationEndMapping.cs
- LinkButton.cs
- ContainerControlDesigner.cs
- TrustManagerPromptUI.cs
- ContractComponent.cs
- __Filters.cs
- UserControlParser.cs
- BasicExpressionVisitor.cs
- CompositeControlDesigner.cs
- PropertyChangedEventArgs.cs
- XmlDocumentSerializer.cs
- ProviderSettings.cs
- SByteStorage.cs
- StateManagedCollection.cs
- ThreadInterruptedException.cs
- WebPartEventArgs.cs
- TrustManagerPromptUI.cs
- MultiBinding.cs
- AnchoredBlock.cs
- PathFigureCollection.cs
- IisTraceListener.cs
- Rect.cs
- VarRemapper.cs
- DataBoundLiteralControl.cs
- handlecollector.cs