C# Class SnmpSharpNet.EthernetAddress

Inheritance: OctetString, ICloneable
显示文件 Open project: griffina/SnmpSharpNet Class Usage Examples

Public Methods

Method Description
Clone ( ) : Object

Create a new object that is a duplicate of the current object.

EthernetAddress ( ) : System

Constructor. Initialize the class to 0000.0000.0000

EthernetAddress ( EthernetAddress second ) : System

Constructor. Initialize the class with the value from the argument class.

EthernetAddress ( OctetString second ) : System

Constructor. Initialize the class with the value from the OctetString argument.

EthernetAddress ( byte data ) : System

Constructor. Initialize the class with the value of the byte array.

Set ( System value ) : void

Parses hex string representing an Ethernet MAC address to the enternal format. Ethernet address has to contain 12 hex characters (1-9 or A-F) to be parsed correctly. Special formatting is ignored so both 0000.0010.0000 and 00-00-00-10-00-00 will be parsed ok.

ToString ( ) : System.String

Return Ethernet MAC address as a string formatted as: xxxx.xxxx.xxxx

Method Details

Clone() public method

Create a new object that is a duplicate of the current object.
public Clone ( ) : Object
return System.Object

EthernetAddress() public method

Constructor. Initialize the class to 0000.0000.0000
public EthernetAddress ( ) : System
return System

EthernetAddress() public method

Constructor. Initialize the class with the value from the argument class.
public EthernetAddress ( EthernetAddress second ) : System
second EthernetAddress Class whose value is copied to initialize this class. ///
return System

EthernetAddress() public method

Constructor. Initialize the class with the value from the OctetString argument.
public EthernetAddress ( OctetString second ) : System
second OctetString Class whose value is used to initialize this class. ///
return System

EthernetAddress() public method

Constructor. Initialize the class with the value of the byte array.
public EthernetAddress ( byte data ) : System
data byte Byte array whose value is used to initialize the class. ///
return System

Set() public method

Parses hex string representing an Ethernet MAC address to the enternal format. Ethernet address has to contain 12 hex characters (1-9 or A-F) to be parsed correctly. Special formatting is ignored so both 0000.0010.0000 and 00-00-00-10-00-00 will be parsed ok.
public Set ( System value ) : void
value System Ethernet address represented as a string. ///
return void

ToString() public method

Return Ethernet MAC address as a string formatted as: xxxx.xxxx.xxxx
public ToString ( ) : System.String
return System.String