HAMSICONTEXT

[DebuggerDisplay("{Value}")]
public readonly struct HAMSICONTEXT : IEquatable<HAMSICONTEXT>
{
    public readonly nint Value;

    public HAMSICONTEXT(nint value) => Value = value;

    public static implicit operator nint(HAMSICONTEXT value) => value.Value;

    public static explicit operator HAMSICONTEXT(nint value) => new(value);

    public static bool operator ==(HAMSICONTEXT left, HAMSICONTEXT right) => left.Value == right.Value;

    public static bool operator !=(HAMSICONTEXT left, HAMSICONTEXT right) => !(left == right);

    public bool Equals(HAMSICONTEXT other) => Value == other.Value;

    public override bool Equals(object obj) => obj is HAMSICONTEXT other && Equals(other);

    public override int GetHashCode() => Value.GetHashCode();

    public override string ToString() => $"0x{Value:x}";
}

Last updated