public static StringContainerNative ConvertToUnmanaged(StringContainer managed) { return(new StringContainerNative { str1 = Marshal.StringToCoTaskMemUTF8(managed.str1), str2 = Marshal.StringToCoTaskMemUTF8(managed.str2) }); }
public StringContainerNative(StringContainer managed) { str1 = Marshal.StringToCoTaskMemUTF8(managed.str1); str2 = Marshal.StringToCoTaskMemUTF8(managed.str2); }
public static StringContainerNative ConvertToUnmanaged(StringContainer managed) => Ref.ConvertToUnmanaged(managed);