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
- UserControl.cs
- TimeSpanMinutesOrInfiniteConverter.cs
- SrgsSubset.cs
- ScriptResourceHandler.cs
- AuthenticationSection.cs
- fixedPageContentExtractor.cs
- CompilationLock.cs
- XmlNamespaceManager.cs
- X509ChainElement.cs
- DataGridViewColumnCollection.cs
- processwaithandle.cs
- TemplateBindingExtensionConverter.cs
- StrokeSerializer.cs
- StateMachineExecutionState.cs
- XPathBinder.cs
- COM2IManagedPerPropertyBrowsingHandler.cs
- CodeAttributeArgumentCollection.cs
- TemplateManager.cs
- ResourcePool.cs
- TextCompositionManager.cs
- TextureBrush.cs
- DynamicResourceExtensionConverter.cs
- Choices.cs
- ServerTooBusyException.cs
- TextDecoration.cs
- ChineseLunisolarCalendar.cs
- SharedStream.cs
- XmlLanguageConverter.cs
- CornerRadiusConverter.cs
- PopupRootAutomationPeer.cs
- RuntimeHelpers.cs
- MDIWindowDialog.cs
- EntityDataSourceChangedEventArgs.cs
- RadioButtonStandardAdapter.cs
- CounterCreationDataCollection.cs
- TextTreeInsertUndoUnit.cs
- SortDescriptionCollection.cs
- FixedSchema.cs
- ItemCollection.cs
- RenameRuleObjectDialog.Designer.cs
- StringInfo.cs
- MessageQueuePermissionEntryCollection.cs
- SmtpNegotiateAuthenticationModule.cs
- Utils.cs
- Identifier.cs
- ColumnHeader.cs
- XmlSchemaSimpleContent.cs
- UriTemplateLiteralQueryValue.cs
- Transactions.cs
- TranslateTransform3D.cs
- OutputCache.cs
- EnumUnknown.cs
- BufferCache.cs
- ADConnectionHelper.cs
- RawKeyboardInputReport.cs
- AssemblySettingAttributes.cs
- ActivityLocationReferenceEnvironment.cs
- ListViewGroupItemCollection.cs
- ResourceDisplayNameAttribute.cs
- Utils.cs
- PreloadedPackages.cs
- HwndTarget.cs
- ModuleBuilderData.cs
- __Filters.cs
- Application.cs
- MbpInfo.cs
- SamlAuthorizationDecisionStatement.cs
- BasePattern.cs
- RTLAwareMessageBox.cs
- DataGridViewImageCell.cs
- CorrelationTokenTypeConvertor.cs
- translator.cs
- XmlSerializableWriter.cs
- _SpnDictionary.cs
- SmtpNegotiateAuthenticationModule.cs
- Point.cs
- XmlSchemaChoice.cs
- RbTree.cs
- ConstructorBuilder.cs
- XmlUrlEditor.cs
- HttpContext.cs
- StaticTextPointer.cs
- DefaultHttpHandler.cs
- SurrogateDataContract.cs
- ByteArrayHelperWithString.cs
- ProxyWebPartConnectionCollection.cs
- Authorization.cs
- DbDataSourceEnumerator.cs
- XmlSchemaCollection.cs
- XomlCompilerError.cs
- HttpCachePolicy.cs
- Manipulation.cs
- ImageFormat.cs
- TreeViewTemplateSelector.cs
- CodeDefaultValueExpression.cs
- PrimarySelectionAdorner.cs
- TypeToken.cs
- BamlReader.cs
- ListViewItemSelectionChangedEvent.cs
- UnsafeNativeMethods.cs