Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Net / System / Net / NetworkInformation / ipaddressinformationcollection.cs / 1305376 / 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 this.GetEnumerator(); } 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 this.GetEnumerator(); } 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
- TrayIconDesigner.cs
- MultiSelectRootGridEntry.cs
- FixedSOMTableRow.cs
- ValidationService.cs
- InvalidCommandTreeException.cs
- EllipseGeometry.cs
- WmlFormAdapter.cs
- RowCache.cs
- TransactedBatchingBehavior.cs
- BamlReader.cs
- PriorityBindingExpression.cs
- CacheMemory.cs
- WindowsListViewGroupHelper.cs
- ShimAsPublicXamlType.cs
- GeneralTransform3DGroup.cs
- IPAddressCollection.cs
- TriggerAction.cs
- altserialization.cs
- RangeExpression.cs
- SchemaImporterExtensionElement.cs
- fixedPageContentExtractor.cs
- ActiveDocumentEvent.cs
- TimeZone.cs
- validation.cs
- wmiprovider.cs
- NotifyParentPropertyAttribute.cs
- List.cs
- WebPageTraceListener.cs
- ImageSourceConverter.cs
- ProcessModuleCollection.cs
- ProcessProtocolHandler.cs
- TemplateParser.cs
- SqlConnectionPoolProviderInfo.cs
- CultureTableRecord.cs
- KnownBoxes.cs
- brushes.cs
- GrammarBuilderRuleRef.cs
- TextEditorCopyPaste.cs
- AddInAdapter.cs
- PieceDirectory.cs
- XamlTemplateSerializer.cs
- ComplexPropertyEntry.cs
- FixedDocumentPaginator.cs
- PageContent.cs
- UriScheme.cs
- sqlcontext.cs
- Decorator.cs
- XmlSubtreeReader.cs
- Duration.cs
- ListItemViewControl.cs
- UniqueIdentifierService.cs
- OdbcUtils.cs
- Trigger.cs
- XmlQualifiedNameTest.cs
- DependencyObjectPropertyDescriptor.cs
- NetTcpBindingCollectionElement.cs
- FixedTextView.cs
- XmlAttributeAttribute.cs
- Vector3DAnimation.cs
- FrugalList.cs
- SchemaContext.cs
- RoutedEventArgs.cs
- WebPartMinimizeVerb.cs
- ImageKeyConverter.cs
- XsdBuildProvider.cs
- PenContexts.cs
- MsmqAuthenticationMode.cs
- DecoderFallback.cs
- FontCollection.cs
- CodeArrayIndexerExpression.cs
- StrokeIntersection.cs
- Wizard.cs
- SignatureResourceHelper.cs
- PenLineCapValidation.cs
- Module.cs
- Itemizer.cs
- PerformanceCounterNameAttribute.cs
- X509RecipientCertificateClientElement.cs
- PaintEvent.cs
- StreamGeometry.cs
- EntityCollection.cs
- CharAnimationUsingKeyFrames.cs
- MouseEvent.cs
- ReferenceConverter.cs
- SynchronizedMessageSource.cs
- ToolBarPanel.cs
- SqlWriter.cs
- XmlValidatingReaderImpl.cs
- DispatcherHookEventArgs.cs
- RightsManagementSuppressedStream.cs
- InfoCardTraceRecord.cs
- PackagePart.cs
- ConfigWriter.cs
- AsymmetricKeyExchangeFormatter.cs
- StdValidatorsAndConverters.cs
- IPGlobalProperties.cs
- LiteralControl.cs
- EntityDataSourceDesignerHelper.cs
- TextParagraph.cs
- SymbolType.cs