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
- ParserStack.cs
- NavigationWindow.cs
- BuildResult.cs
- DataObjectCopyingEventArgs.cs
- HttpListenerTimeoutManager.cs
- GetPageCompletedEventArgs.cs
- QueryPageSettingsEventArgs.cs
- LeaseManager.cs
- CopyNamespacesAction.cs
- FormsAuthenticationConfiguration.cs
- XsltContext.cs
- ScriptControlDescriptor.cs
- PipeStream.cs
- Camera.cs
- _PooledStream.cs
- ComUdtElement.cs
- GlobalProxySelection.cs
- XmlName.cs
- DbParameterCollectionHelper.cs
- ExtensionSimplifierMarkupObject.cs
- StringOutput.cs
- _HelperAsyncResults.cs
- Config.cs
- ToolStripMenuItemCodeDomSerializer.cs
- NavigationPropertyEmitter.cs
- SelectedGridItemChangedEvent.cs
- CombinedGeometry.cs
- BooleanFunctions.cs
- BuilderPropertyEntry.cs
- WebFormDesignerActionService.cs
- PrivilegedConfigurationManager.cs
- SystemTcpConnection.cs
- OptimisticConcurrencyException.cs
- Win32MouseDevice.cs
- BooleanStorage.cs
- StringWriter.cs
- Transactions.cs
- SqlCaseSimplifier.cs
- DesignerView.xaml.cs
- NameSpaceExtractor.cs
- DocumentReferenceCollection.cs
- UnsafeNetInfoNativeMethods.cs
- XmlSchemaComplexType.cs
- ComponentCollection.cs
- ZipIOLocalFileBlock.cs
- XmlException.cs
- MouseCaptureWithinProperty.cs
- RenderContext.cs
- OperationCanceledException.cs
- BmpBitmapEncoder.cs
- EmptyReadOnlyDictionaryInternal.cs
- IndentedWriter.cs
- XmlSchemaSimpleType.cs
- EventProviderBase.cs
- CompoundFileIOPermission.cs
- GenericQueueSurrogate.cs
- EntityStoreSchemaFilterEntry.cs
- XmlLinkedNode.cs
- PeerInputChannel.cs
- AttributeAction.cs
- SizeAnimationBase.cs
- DefaultTypeArgumentAttribute.cs
- CodeTypeMember.cs
- LicenseContext.cs
- TraceContextEventArgs.cs
- CustomBindingElementCollection.cs
- ReservationCollection.cs
- SmtpSection.cs
- elementinformation.cs
- TextServicesProperty.cs
- SerializerProvider.cs
- ReferenceConverter.cs
- IndexedString.cs
- TypeConverter.cs
- CompareInfo.cs
- HttpCachePolicyElement.cs
- StreamAsIStream.cs
- DataSourceExpressionCollection.cs
- SQLInt64Storage.cs
- TransactionsSectionGroup.cs
- Timer.cs
- SerializationObjectManager.cs
- XmlObjectSerializerWriteContextComplex.cs
- EncodingTable.cs
- EventWaitHandle.cs
- SqlCrossApplyToCrossJoin.cs
- CommandField.cs
- ConnectionInterfaceCollection.cs
- CollectionDataContractAttribute.cs
- BindingWorker.cs
- MarkupProperty.cs
- PointAnimation.cs
- counter.cs
- SafeViewOfFileHandle.cs
- TimeSpan.cs
- entitydatasourceentitysetnameconverter.cs
- TcpConnectionPool.cs
- MouseActionValueSerializer.cs
- SafeFindHandle.cs
- OperatorExpressions.cs