Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Net / System / Net / NetworkInformation / UnicastIPAddressInformationCollection.cs / 1305376 / UnicastIPAddressInformationCollection.cs
using System.Collections.Generic; using System.Collections.ObjectModel; namespace System.Net.NetworkInformation{ public class UnicastIPAddressInformationCollection :ICollection{ Collection addresses = new Collection () ; protected internal UnicastIPAddressInformationCollection(){ } /// public virtual void CopyTo(UnicastIPAddressInformation[] 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(UnicastIPAddressInformation address) { throw new NotSupportedException(SR.GetString(SR.net_collection_readonly)); } internal void InternalAdd(UnicastIPAddressInformation address) { addresses.Add(address); } /// public virtual bool Contains(UnicastIPAddressInformation address) { return addresses.Contains(address); } System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { return this.GetEnumerator(); } public virtual IEnumerator GetEnumerator() { return (IEnumerator ) addresses.GetEnumerator(); } // Consider removing. public virtual UnicastIPAddressInformation this[int index] { get{ return (UnicastIPAddressInformation)addresses[index]; } } /// public virtual bool Remove(UnicastIPAddressInformation 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 UnicastIPAddressInformationCollection :ICollection { Collection addresses = new Collection () ; protected internal UnicastIPAddressInformationCollection(){ } /// public virtual void CopyTo(UnicastIPAddressInformation[] 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(UnicastIPAddressInformation address) { throw new NotSupportedException(SR.GetString(SR.net_collection_readonly)); } internal void InternalAdd(UnicastIPAddressInformation address) { addresses.Add(address); } /// public virtual bool Contains(UnicastIPAddressInformation address) { return addresses.Contains(address); } System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { return this.GetEnumerator(); } public virtual IEnumerator GetEnumerator() { return (IEnumerator ) addresses.GetEnumerator(); } // Consider removing. public virtual UnicastIPAddressInformation this[int index] { get{ return (UnicastIPAddressInformation)addresses[index]; } } /// public virtual bool Remove(UnicastIPAddressInformation 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
- DispatcherTimer.cs
- EventLogTraceListener.cs
- AdvancedBindingPropertyDescriptor.cs
- BoundField.cs
- XmlMemberMapping.cs
- WrappedKeySecurityToken.cs
- DataGridViewCheckBoxCell.cs
- NotifyParentPropertyAttribute.cs
- OracleDataReader.cs
- ShutDownListener.cs
- RelationshipSet.cs
- ZipIOCentralDirectoryDigitalSignature.cs
- Point3D.cs
- IPAddress.cs
- TransactionFormatter.cs
- CallId.cs
- TextEndOfParagraph.cs
- BrowserInteropHelper.cs
- ColorAnimation.cs
- MediaPlayer.cs
- WebDisplayNameAttribute.cs
- SuppressMergeCheckAttribute.cs
- webclient.cs
- ProcessInfo.cs
- RangeBaseAutomationPeer.cs
- DataTableNewRowEvent.cs
- DeviceSpecific.cs
- ClipboardProcessor.cs
- AjaxFrameworkAssemblyAttribute.cs
- InputMethodStateChangeEventArgs.cs
- PeerUnsafeNativeCryptMethods.cs
- ObfuscationAttribute.cs
- ServiceDescription.cs
- LogReserveAndAppendState.cs
- InvariantComparer.cs
- BevelBitmapEffect.cs
- FramingFormat.cs
- MatchingStyle.cs
- Vector3DAnimation.cs
- ErrorFormatter.cs
- ReferencedCollectionType.cs
- Operand.cs
- EmptyImpersonationContext.cs
- WmlTextViewAdapter.cs
- FactoryRecord.cs
- FilteredDataSetHelper.cs
- CacheDependency.cs
- CngKeyCreationParameters.cs
- DesignColumn.cs
- HistoryEventArgs.cs
- BitArray.cs
- Stylesheet.cs
- ComponentEditorPage.cs
- XamlBuildProvider.cs
- WpfGeneratedKnownProperties.cs
- HtmlEmptyTagControlBuilder.cs
- ServiceOperationUIEditor.cs
- EventsTab.cs
- ClientCultureInfo.cs
- Tile.cs
- StatusBar.cs
- Rotation3D.cs
- ToolStripGrip.cs
- WebReferenceOptions.cs
- ExtentKey.cs
- SessionPageStatePersister.cs
- WebPartVerbCollection.cs
- TaiwanCalendar.cs
- SrgsElement.cs
- XmlNamespaceMapping.cs
- NativeMethods.cs
- System.Data.OracleClient_BID.cs
- SchemaElement.cs
- NotifyParentPropertyAttribute.cs
- ViewStateChangedEventArgs.cs
- SystemDropShadowChrome.cs
- DefaultSerializationProviderAttribute.cs
- ContainerParaClient.cs
- Selector.cs
- VerificationAttribute.cs
- DelegatingConfigHost.cs
- ApplySecurityAndSendAsyncResult.cs
- DesignerVerb.cs
- LiteralControl.cs
- RealizationContext.cs
- DecoderFallback.cs
- RestHandler.cs
- Preprocessor.cs
- SpnegoTokenProvider.cs
- WeakEventTable.cs
- BuilderPropertyEntry.cs
- LogLogRecordEnumerator.cs
- HttpServerUtilityWrapper.cs
- GlyphShapingProperties.cs
- TextBreakpoint.cs
- WindowsFormsSectionHandler.cs
- InfocardExtendedInformationEntry.cs
- SqlDelegatedTransaction.cs
- BitmapEffectInputData.cs
- IntegerValidator.cs