示例#1
0
 public static StringContainerNative ConvertToUnmanaged(StringContainer managed)
 {
     return(new StringContainerNative
     {
         str1 = Marshal.StringToCoTaskMemUTF8(managed.str1),
         str2 = Marshal.StringToCoTaskMemUTF8(managed.str2)
     });
 }
示例#2
0
 public StringContainerNative(StringContainer managed)
 {
     str1 = Marshal.StringToCoTaskMemUTF8(managed.str1);
     str2 = Marshal.StringToCoTaskMemUTF8(managed.str2);
 }
示例#3
0
 public static StringContainerNative ConvertToUnmanaged(StringContainer managed)
 => Ref.ConvertToUnmanaged(managed);