Struct TlvRecord
- Namespace
- Plugin.ByteArrays
- Assembly
- Plugin.ByteArrays.dll
Represents a TLV (Type-Length-Value) structure.
public readonly struct TlvRecord : IEquatable<TlvRecord>
- Implements
- Inherited Members
- Extension Methods
Constructors
TlvRecord(byte, ushort, byte[])
Initializes a new instance of the TlvRecord struct.
public TlvRecord(byte type, ushort length, byte[] value)
Parameters
Properties
Length
Gets the length field of the TLV record.
public ushort Length { get; }
Property Value
Type
Gets the type field of the TLV record.
public byte Type { get; }
Property Value
Value
Gets the value field of the TLV record.
public IReadOnlyList<byte> Value { get; }
Property Value
Methods
Equals(TlvRecord)
Determines whether the specified TlvRecord is equal to the current TlvRecord.
public bool Equals(TlvRecord other)
Parameters
other
TlvRecordThe TlvRecord to compare with the current TlvRecord.
Returns
- bool
true if the specified TlvRecord is equal to the current TlvRecord; otherwise, false.
Equals(object?)
Determines whether the specified object is equal to the current TlvRecord.
public override bool Equals(object? obj)
Parameters
obj
objectThe object to compare with the current TlvRecord.
Returns
- bool
true if the specified object is equal to the current TlvRecord; otherwise, false.
GetHashCode()
Returns the hash code for this TlvRecord.
public override int GetHashCode()
Returns
- int
A 32-bit signed integer hash code.
Operators
operator ==(TlvRecord, TlvRecord)
Determines whether two TlvRecord instances are equal.
public static bool operator ==(TlvRecord left, TlvRecord right)
Parameters
Returns
- bool
true if the TlvRecord instances are equal; otherwise, false.
operator !=(TlvRecord, TlvRecord)
Determines whether two TlvRecord instances are not equal.
public static bool operator !=(TlvRecord left, TlvRecord right)
Parameters
Returns
- bool
true if the TlvRecord instances are not equal; otherwise, false.