Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Net / System / Net / NetworkInformation / NetworkInterface.cs / 1305376 / NetworkInterface.cs
using System;
namespace System.Net.NetworkInformation
{
public abstract class NetworkInterface
{
/// Returns objects that describe the network interfaces on the local computer.
public static NetworkInterface[] GetAllNetworkInterfaces(){
(new NetworkInformationPermission(NetworkInformationAccess.Read)).Demand();
return SystemNetworkInterface.GetNetworkInterfaces();
}
public static bool GetIsNetworkAvailable(){
return SystemNetworkInterface.InternalGetIsNetworkAvailable();
}
public static int LoopbackInterfaceIndex{
get{
return SystemNetworkInterface.InternalLoopbackInterfaceIndex;
}
}
public abstract string Id{get;}
/// Gets the name of the network interface.
public abstract string Name{get;}
/// Gets the description of the network interface
public abstract string Description{get;}
/// Gets the IP properties for this network interface.
public abstract IPInterfaceProperties GetIPProperties();
/// Provides Internet Protocol (IP) statistical data for thisnetwork interface.
public abstract IPv4InterfaceStatistics GetIPv4Statistics();
/// Gets the current operational state of the network connection.
public abstract OperationalStatus OperationalStatus{get;}
/// Gets the speed of the interface in bits per second as reported by the interface.
public abstract long Speed{get;}
/// Gets a bool value that indicates whether the network interface is set to only receive data packets.
public abstract bool IsReceiveOnly{get;}
/// Gets a bool value that indicates whether this network interface is enabled to receive multicast packets.
public abstract bool SupportsMulticast{get;}
/// Gets the physical address of this network interface
/// deonb. This is okay if you don't support this in Whidbey. This actually belongs in the NetworkAdapter derived class
public abstract PhysicalAddress GetPhysicalAddress();
/// Gets the interface type.
public abstract NetworkInterfaceType NetworkInterfaceType{get;}
public abstract bool Supports(NetworkInterfaceComponent networkInterfaceComponent);
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.
using System;
namespace System.Net.NetworkInformation
{
public abstract class NetworkInterface
{
/// Returns objects that describe the network interfaces on the local computer.
public static NetworkInterface[] GetAllNetworkInterfaces(){
(new NetworkInformationPermission(NetworkInformationAccess.Read)).Demand();
return SystemNetworkInterface.GetNetworkInterfaces();
}
public static bool GetIsNetworkAvailable(){
return SystemNetworkInterface.InternalGetIsNetworkAvailable();
}
public static int LoopbackInterfaceIndex{
get{
return SystemNetworkInterface.InternalLoopbackInterfaceIndex;
}
}
public abstract string Id{get;}
/// Gets the name of the network interface.
public abstract string Name{get;}
/// Gets the description of the network interface
public abstract string Description{get;}
/// Gets the IP properties for this network interface.
public abstract IPInterfaceProperties GetIPProperties();
/// Provides Internet Protocol (IP) statistical data for thisnetwork interface.
public abstract IPv4InterfaceStatistics GetIPv4Statistics();
/// Gets the current operational state of the network connection.
public abstract OperationalStatus OperationalStatus{get;}
/// Gets the speed of the interface in bits per second as reported by the interface.
public abstract long Speed{get;}
/// Gets a bool value that indicates whether the network interface is set to only receive data packets.
public abstract bool IsReceiveOnly{get;}
/// Gets a bool value that indicates whether this network interface is enabled to receive multicast packets.
public abstract bool SupportsMulticast{get;}
/// Gets the physical address of this network interface
/// deonb. This is okay if you don't support this in Whidbey. This actually belongs in the NetworkAdapter derived class
public abstract PhysicalAddress GetPhysicalAddress();
/// Gets the interface type.
public abstract NetworkInterfaceType NetworkInterfaceType{get;}
public abstract bool Supports(NetworkInterfaceComponent networkInterfaceComponent);
}
}
// 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
- Timer.cs
- ZoneIdentityPermission.cs
- Triplet.cs
- InProcStateClientManager.cs
- IOException.cs
- TextRangeSerialization.cs
- ObjectQueryState.cs
- ContentTextAutomationPeer.cs
- ObjectItemLoadingSessionData.cs
- DomainUpDown.cs
- WebSysDisplayNameAttribute.cs
- ValueTypeFixupInfo.cs
- ViewManager.cs
- BulletedList.cs
- DiagnosticTraceSchemas.cs
- SHA256.cs
- EmbeddedMailObjectsCollection.cs
- WebPartChrome.cs
- LocationSectionRecord.cs
- OletxDependentTransaction.cs
- Cursor.cs
- WebBrowserDocumentCompletedEventHandler.cs
- BackgroundWorker.cs
- TextRenderingModeValidation.cs
- InternalPermissions.cs
- XsltConvert.cs
- CommandField.cs
- WindowsTokenRoleProvider.cs
- BoundField.cs
- PropertyGroupDescription.cs
- ComNativeDescriptor.cs
- WebHeaderCollection.cs
- ActivityMarkupSerializer.cs
- DataGridViewTextBoxEditingControl.cs
- DynamicValidatorEventArgs.cs
- SingleConverter.cs
- HeaderPanel.cs
- TypeDelegator.cs
- HttpCacheParams.cs
- safesecurityhelperavalon.cs
- propertyentry.cs
- LocalServiceSecuritySettingsElement.cs
- OdbcConnectionFactory.cs
- FixedTextContainer.cs
- LogWriteRestartAreaState.cs
- Geometry.cs
- GB18030Encoding.cs
- UnhandledExceptionEventArgs.cs
- WarningException.cs
- DataGridViewLinkCell.cs
- DataRow.cs
- NetworkStream.cs
- RegistryConfigurationProvider.cs
- SplashScreen.cs
- KeyConverter.cs
- BindingMAnagerBase.cs
- ThemeableAttribute.cs
- AssemblyNameProxy.cs
- TreeViewCancelEvent.cs
- CodeParameterDeclarationExpression.cs
- SqlCacheDependency.cs
- TraceHandlerErrorFormatter.cs
- BuilderPropertyEntry.cs
- BufferBuilder.cs
- ContentElementAutomationPeer.cs
- DataServiceRequestOfT.cs
- WindowsUpDown.cs
- RecipientInfo.cs
- ConfigurationStrings.cs
- WebPartAddingEventArgs.cs
- EntityWithChangeTrackerStrategy.cs
- HttpConfigurationSystem.cs
- DBConnectionString.cs
- SignatureHelper.cs
- OleDbMetaDataFactory.cs
- objectresult_tresulttype.cs
- SecurityElement.cs
- XmlDataDocument.cs
- SpellCheck.cs
- FindSimilarActivitiesVerb.cs
- TextTreeTextNode.cs
- SecurityManager.cs
- DriveNotFoundException.cs
- DataGridViewLayoutData.cs
- EventSourceCreationData.cs
- Canonicalizers.cs
- EventKeyword.cs
- AdjustableArrowCap.cs
- DynamicValidatorEventArgs.cs
- FrameworkRichTextComposition.cs
- SqlMethodAttribute.cs
- SimpleTypesSurrogate.cs
- DateTimeOffsetConverter.cs
- StickyNote.cs
- EntityDataSourceChangedEventArgs.cs
- ConnectionPoolManager.cs
- EmptyReadOnlyDictionaryInternal.cs
- WebServiceResponseDesigner.cs
- ArrayTypeMismatchException.cs
- Window.cs