Exemple #1
0
        private static void WinRT_Nullable <T>() where T : struct
        {
            T?t = null;

            NullableMarshaler.ConvertToNative <T>(ref t);
            NullableMarshaler.ConvertToManagedRetVoid <T>(IntPtr.Zero, ref t);
        }
Exemple #2
0
        private static void WinRT_Nullable <T>() where T : struct
        {
            Nullable <T> nullable = new Nullable <T>();

            NullableMarshaler.ConvertToNative(ref nullable);
            NullableMarshaler.ConvertToManagedRetVoid(IntPtr.Zero, ref nullable);
        }