Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Net / System / Net / NetworkInformation / IPAddressCollection.cs / 1305376 / 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 this.GetEnumerator(); } 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 this.GetEnumerator(); } 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
- RowToFieldTransformer.cs
- ProgressBarBrushConverter.cs
- DrawTreeNodeEventArgs.cs
- Base64Decoder.cs
- KoreanCalendar.cs
- SqlTriggerAttribute.cs
- RoutedEventValueSerializer.cs
- DiscoveryReference.cs
- AssemblySettingAttributes.cs
- StorageEndPropertyMapping.cs
- MarshalByRefObject.cs
- PersonalizationState.cs
- AppDomainShutdownMonitor.cs
- HttpRuntimeSection.cs
- XmlReflectionImporter.cs
- LoadWorkflowByInstanceKeyCommand.cs
- XmlNamespaceMappingCollection.cs
- TextBox.cs
- BuildProvider.cs
- TransportListener.cs
- ReflectTypeDescriptionProvider.cs
- WebPartTransformerAttribute.cs
- OlePropertyStructs.cs
- RadioButtonPopupAdapter.cs
- PrivilegeNotHeldException.cs
- ICspAsymmetricAlgorithm.cs
- Semaphore.cs
- Knowncolors.cs
- FilteredSchemaElementLookUpTable.cs
- RelationshipEndMember.cs
- ProfileSection.cs
- ConditionalDesigner.cs
- WebPartConnectionsCancelVerb.cs
- LogSwitch.cs
- PassportIdentity.cs
- XmlProcessingInstruction.cs
- SectionRecord.cs
- ClientSettingsProvider.cs
- HttpRawResponse.cs
- ImageMap.cs
- EastAsianLunisolarCalendar.cs
- ByteStreamMessageEncodingElement.cs
- CustomValidator.cs
- ButtonPopupAdapter.cs
- DesignerUtils.cs
- PackWebResponse.cs
- FrugalMap.cs
- SqlWriter.cs
- ParseHttpDate.cs
- DataSourceCache.cs
- ArrangedElementCollection.cs
- ObjectConverter.cs
- PointConverter.cs
- XmlSchemaAny.cs
- GridViewRowPresenter.cs
- XPathBinder.cs
- SessionEndedEventArgs.cs
- Relationship.cs
- Input.cs
- Soap.cs
- FastEncoderWindow.cs
- DoubleLinkList.cs
- DefaultProxySection.cs
- SharedUtils.cs
- ToolStripDropDownButton.cs
- CompoundFileStorageReference.cs
- WebPartDisplayModeEventArgs.cs
- DataListCommandEventArgs.cs
- Transform3DCollection.cs
- Baml2006SchemaContext.cs
- SpeechEvent.cs
- FirewallWrapper.cs
- ConfigXmlCDataSection.cs
- AndAlso.cs
- MemberProjectedSlot.cs
- JsonStringDataContract.cs
- Thickness.cs
- XPathAncestorIterator.cs
- SqlCaseSimplifier.cs
- ComAdminInterfaces.cs
- Win32.cs
- GrabHandleGlyph.cs
- PolyQuadraticBezierSegment.cs
- SettingsAttributeDictionary.cs
- ObjectDataSourceEventArgs.cs
- RemoteWebConfigurationHost.cs
- GenericIdentity.cs
- UnauthorizedAccessException.cs
- PeerInvitationResponse.cs
- TableRowCollection.cs
- AutoGeneratedFieldProperties.cs
- SecurityPolicySection.cs
- DynamicILGenerator.cs
- ObjectDataSourceStatusEventArgs.cs
- MouseBinding.cs
- KnownBoxes.cs
- WindowsRegion.cs
- EventPrivateKey.cs
- EllipseGeometry.cs
- COAUTHIDENTITY.cs