bool on the Rust side but byte on the C# side, or (better) make a user-defined struct on the C# side, e.g. "ByteBool", that holds a single byte value and implements the conversions to/from System.Boolean.
[StructLayout(LayoutKind.Sequential)]
public struct test
{
public ByteBool isbool;
}
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
C# bools are Win32 BOOLs are 32-bit signed integers, for historical reasons.
Still, Marshall as book "should" work, correct?
bool on the Rust side but byte on the C# side, or (better) make a user-defined struct on the C# side, e.g. "ByteBool", that holds a single byte value and implements the conversions to/from System.Boolean.
[StructLayout(LayoutKind.Sequential)]
public struct test
{
public ByteBool isbool;
}