Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- MembershipUser.cs
- DefaultBindingPropertyAttribute.cs
- TTSEngineTypes.cs
- BaseTemplateParser.cs
- ColorDialog.cs
- Route.cs
- ReadOnlyNameValueCollection.cs
- DataService.cs
- EventProviderWriter.cs
- ModelTreeEnumerator.cs
- ThicknessConverter.cs
- PeerNameRecord.cs
- AutomationAttributeInfo.cs
- SchemaEntity.cs
- Knowncolors.cs
- NotifyCollectionChangedEventArgs.cs
- ControlBuilder.cs
- AuthStoreRoleProvider.cs
- UIAgentCrashedException.cs
- IdentityManager.cs
- TreeNodeStyleCollection.cs
- DbParameterCollection.cs
- PersonalizationStateInfo.cs
- DataBoundControl.cs
- LayoutExceptionEventArgs.cs
- SyntaxCheck.cs
- StyleCollection.cs
- TableLayoutRowStyleCollection.cs
- WebPartEditorApplyVerb.cs
- HtmlInputImage.cs
- EdmProviderManifest.cs
- RootBuilder.cs
- UpWmlMobileTextWriter.cs
- PrintDialogException.cs
- ValueUtilsSmi.cs
- ToolStripItemCollection.cs
- SelectionProcessor.cs
- TextBlockAutomationPeer.cs
- FuncCompletionCallbackWrapper.cs
- SyndicationSerializer.cs
- DaylightTime.cs
- Query.cs
- SystemNetworkInterface.cs
- SchemaReference.cs
- PageParserFilter.cs
- DescendantBaseQuery.cs
- DetailsViewPageEventArgs.cs
- WebPartConnectionsConnectVerb.cs
- StatusBarDesigner.cs
- CodeDirectionExpression.cs
- _NestedMultipleAsyncResult.cs
- ImageDrawing.cs
- FlowPanelDesigner.cs
- CodeCompileUnit.cs
- AffineTransform3D.cs
- OAVariantLib.cs
- ConnectionStringSettingsCollection.cs
- BitmapMetadataBlob.cs
- ReturnValue.cs
- CancelEventArgs.cs
- BlurBitmapEffect.cs
- ClonableStack.cs
- BrushValueSerializer.cs
- XmlQueryCardinality.cs
- CrossAppDomainChannel.cs
- StreamingContext.cs
- PeerCustomResolverBindingElement.cs
- TextTreeTextNode.cs
- ToolStripDropTargetManager.cs
- TemplateBindingExpression.cs
- SamlSubjectStatement.cs
- SiteMapNodeItem.cs
- GeometryConverter.cs
- FlowLayoutPanel.cs
- StringUtil.cs
- ChannelTraceRecord.cs
- InternalDispatchObject.cs
- HeaderUtility.cs
- BooleanStorage.cs
- MatchAttribute.cs
- WorkflowOperationInvoker.cs
- Root.cs
- PeerResolverBindingElement.cs
- XmlSchemaSimpleContent.cs
- ReadOnlyCollectionBase.cs
- TakeQueryOptionExpression.cs
- StackSpiller.cs
- PropertyChange.cs
- EtwTrace.cs
- DynamicILGenerator.cs
- SecurityRuntime.cs
- DataGridViewButtonCell.cs
- MetadataArtifactLoaderResource.cs
- XmlElement.cs
- ConnectionManagementElement.cs
- Decoder.cs
- DashStyles.cs
- IteratorDescriptor.cs
- CheckBox.cs
- DockPatternIdentifiers.cs