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
- BindingValueChangedEventArgs.cs
- XmlCountingReader.cs
- XmlArrayItemAttributes.cs
- StringAnimationBase.cs
- RepeatButton.cs
- ObsoleteAttribute.cs
- StackBuilderSink.cs
- GridSplitter.cs
- DateTimeFormatInfo.cs
- CryptoStream.cs
- CDSCollectionETWBCLProvider.cs
- FilterQuery.cs
- HtmlFormAdapter.cs
- PathSegment.cs
- TextBoxView.cs
- DataSourceHelper.cs
- MethodExecutor.cs
- SwitchAttribute.cs
- ToolBarOverflowPanel.cs
- TextCollapsingProperties.cs
- TextRangeEditTables.cs
- GeneralTransform3DTo2D.cs
- SafeFileMapViewHandle.cs
- ZipPackagePart.cs
- SmiTypedGetterSetter.cs
- HtmlInputPassword.cs
- XsdBuilder.cs
- XmlImplementation.cs
- HwndHost.cs
- AddingNewEventArgs.cs
- counter.cs
- BamlRecordWriter.cs
- HostedTransportConfigurationManager.cs
- BadImageFormatException.cs
- SessionSwitchEventArgs.cs
- VerificationException.cs
- DeclaredTypeValidator.cs
- EntityKeyElement.cs
- Logging.cs
- GraphicsState.cs
- Point3DIndependentAnimationStorage.cs
- ManagementOperationWatcher.cs
- Scanner.cs
- ComponentResourceKey.cs
- ErasingStroke.cs
- Point4DConverter.cs
- SiteIdentityPermission.cs
- OpenTypeMethods.cs
- ObjectConverter.cs
- SafeViewOfFileHandle.cs
- InstanceKeyNotReadyException.cs
- RandomDelaySendsAsyncResult.cs
- Brushes.cs
- TargetConverter.cs
- ContextStack.cs
- ScriptResourceAttribute.cs
- BidPrivateBase.cs
- LinqMaximalSubtreeNominator.cs
- TypefaceCollection.cs
- DictionaryTraceRecord.cs
- MatcherBuilder.cs
- SchemaTableColumn.cs
- BinaryConverter.cs
- XsltArgumentList.cs
- SafeViewOfFileHandle.cs
- RecognitionEventArgs.cs
- MediaContextNotificationWindow.cs
- MaskDescriptors.cs
- DataControlPagerLinkButton.cs
- PassportAuthenticationEventArgs.cs
- SchemaImporter.cs
- BooleanSwitch.cs
- SHA384.cs
- IndentedWriter.cs
- TargetInvocationException.cs
- sitestring.cs
- SendKeys.cs
- MethodCallTranslator.cs
- TextLineBreak.cs
- AngleUtil.cs
- DbExpressionBuilder.cs
- PagedDataSource.cs
- CustomValidator.cs
- DetailsViewDeleteEventArgs.cs
- InkCanvasFeedbackAdorner.cs
- RequestResizeEvent.cs
- PlainXmlWriter.cs
- Schedule.cs
- ContainerAction.cs
- KnownIds.cs
- Italic.cs
- FixedSOMSemanticBox.cs
- WindowsClaimSet.cs
- validationstate.cs
- BehaviorEditorPart.cs
- ArraySubsetEnumerator.cs
- ChildTable.cs
- BindingFormattingDialog.cs
- TagPrefixAttribute.cs
- PointLightBase.cs