Struct OpaqueValue<T>
Represents an opaque value that can be passed
to unmanaged code as nint.
Assembly: DotNext.Unsafe.dll
Syntax
[NativeMarshalling(typeof(OpaqueValueMarshaller<>))]
public readonly struct OpaqueValue<T> : IDisposable, IEquatable<OpaqueValue<T>> where T : notnull
Type Parameters
| Name |
Description |
| T |
The underlying type.
|
Constructors
View Source
OpaqueValue(T?)
Creates a copy of the value or reference and makes it available from within the unmanaged code.
Declaration
public OpaqueValue(T? value)
Parameters
| Type |
Name |
Description |
| T |
value |
The value that can be accessed from the unmanaged code.
|
Methods
View Source
Dispose()
Releases the underlying storage for the value.
Declaration
View Source
Equals(OpaqueValue<T>)
Declaration
public bool Equals(OpaqueValue<T> other)
Parameters
Returns
View Source
Equals(object)
Declaration
public override bool Equals(object obj)
Parameters
| Type |
Name |
Description |
| object |
obj |
|
Returns
Overrides
View Source
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Overrides
View Source
ToString()
Declaration
public override string ToString()
Returns
Overrides
Operators
View Source
operator ==(OpaqueValue<T>, OpaqueValue<T>)
Declaration
public static bool operator ==(OpaqueValue<T> left, OpaqueValue<T> right)
Parameters
Returns
View Source
operator !=(OpaqueValue<T>, OpaqueValue<T>)
Declaration
public static bool operator !=(OpaqueValue<T> left, OpaqueValue<T> right)
Parameters
Returns
Implements
Extension Methods
See Also