Table of Contents

Class IP

Namespace
Lextm.SharpSnmpLib
Assembly
SharpSnmpLib.dll

IPAddress type.

public sealed class IP : ISnmpData, IEquatable<IP>
Inheritance
IP
Implements
Inherited Members
Extension Methods

Constructors

IP(byte[])

Initializes a new instance of the IP class.

public IP(byte[] ip)

Parameters

ip byte[]

The IP bytes.

Exceptions

ArgumentNullException

ip is null.

IP(string)

Creates a new instance of the IP class from a specific string.

public IP(string ip)

Parameters

ip string

IP string

IP(Tuple<int, byte[]>, Stream)

Initializes a new instance of the IP class.

public IP(Tuple<int, byte[]> length, Stream stream)

Parameters

length Tuple<int, byte[]>

The length.

stream Stream

The stream.

Properties

TypeCode

Type code.

public SnmpType TypeCode { get; }

Property Value

SnmpType

Methods

AppendBytesTo(Stream)

Appends the bytes to Stream.

public void AppendBytesTo(Stream stream)

Parameters

stream Stream

The stream.

Equals(IP?)

Indicates whether the current object is equal to another object of the same type.

public bool Equals(IP? other)

Parameters

other IP

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

Equals(object?)

Determines whether the specified object is equal to the current IP.

public override bool Equals(object? obj)

Parameters

obj object

The object to compare with the current IP.

Returns

bool

true if the specified object is equal to the current IP; otherwise, false.

GetHashCode()

Serves as a hash function for a particular type.

public override int GetHashCode()

Returns

int

A hash code for the current IP.

GetRaw()

Gets the raw bytes.

public byte[] GetRaw()

Returns

byte[]

System.Byte[].

ToString()

Returns a string that represents this IP.

public override string ToString()

Returns

string

Operators

operator ==(IP?, IP?)

The equality operator.

public static bool operator ==(IP? left, IP? right)

Parameters

left IP

Left IP object

right IP

Right IP object

Returns

bool

Returns true if the values of its operands are equal, false otherwise.

operator !=(IP?, IP?)

The inequality operator.

public static bool operator !=(IP? left, IP? right)

Parameters

left IP

Left IP object

right IP

Right IP object

Returns

bool

Returns true if the values of its operands are not equal, false otherwise.