Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
- TabPageDesigner.cs
- SQlBooleanStorage.cs
- IndexOutOfRangeException.cs
- TaiwanCalendar.cs
- ReflectionUtil.cs
- FunctionDefinition.cs
- WCFServiceClientProxyGenerator.cs
- ComboBoxRenderer.cs
- ClosableStream.cs
- SemanticBasicElement.cs
- _ContextAwareResult.cs
- CodeBinaryOperatorExpression.cs
- ScaleTransform.cs
- validation.cs
- PropertyInformation.cs
- SoapObjectInfo.cs
- FixedLineResult.cs
- BinaryFormatterSinks.cs
- HelpKeywordAttribute.cs
- ObjectDataSourceDisposingEventArgs.cs
- DataGridViewEditingControlShowingEventArgs.cs
- EventLevel.cs
- CacheForPrimitiveTypes.cs
- EllipseGeometry.cs
- ValidationSummary.cs
- ResourceAttributes.cs
- StyleSheetComponentEditor.cs
- ThousandthOfEmRealDoubles.cs
- ContentDisposition.cs
- webeventbuffer.cs
- ObjectDisposedException.cs
- serverconfig.cs
- ContentElement.cs
- ListViewTableRow.cs
- AppDomainProtocolHandler.cs
- PngBitmapDecoder.cs
- SafeViewOfFileHandle.cs
- ConfigurationPermission.cs
- Sequence.cs
- _SslSessionsCache.cs
- EntitySetBase.cs
- Freezable.cs
- LineSegment.cs
- GreenMethods.cs
- IndependentAnimationStorage.cs
- DeclaredTypeValidatorAttribute.cs
- WorkflowEventArgs.cs
- ExpressionNormalizer.cs
- ByteArrayHelperWithString.cs
- ClrProviderManifest.cs
- KeyValuePairs.cs
- _UriTypeConverter.cs
- ProcessInfo.cs
- ConfigurationSectionCollection.cs
- MonthCalendar.cs
- DBPropSet.cs
- DelimitedListTraceListener.cs
- RedistVersionInfo.cs
- ExportException.cs
- AttachedPropertyInfo.cs
- DropSource.cs
- TabControl.cs
- TemplateBindingExtension.cs
- PropertyGrid.cs
- StreamResourceInfo.cs
- SpanIndex.cs
- FileUpload.cs
- SqlConnectionFactory.cs
- XamlLoadErrorInfo.cs
- ContentPosition.cs
- VScrollBar.cs
- RuleInfoComparer.cs
- TracingConnection.cs
- BufferAllocator.cs
- Enum.cs
- CellTreeNodeVisitors.cs
- SizeAnimationBase.cs
- TypeSystemHelpers.cs
- PersonalizationStateInfo.cs
- MailWebEventProvider.cs
- FileRecordSequence.cs
- SqlUserDefinedAggregateAttribute.cs
- Socket.cs
- SingleStorage.cs
- WebBrowserUriTypeConverter.cs
- ControlBuilderAttribute.cs
- Vector3DCollectionValueSerializer.cs
- AssociationProvider.cs
- ScriptControl.cs
- DataBoundControlHelper.cs
- ResourceAssociationSet.cs
- ProfileBuildProvider.cs
- SafeEventLogWriteHandle.cs
- XamlVector3DCollectionSerializer.cs
- FlowDocumentPageViewerAutomationPeer.cs
- OracleColumn.cs
- SQLDecimalStorage.cs
- Delegate.cs
- AffineTransform3D.cs
- PriorityRange.cs