コード例 #1
0
 // Special cases
 public HFA_4 DoubleHVAValues(ref HFA_4 input)
 {
     input.x *= 2;
     input.y *= 2;
     input.z *= 2;
     input.w *= 2;
     return(input);
 }
コード例 #2
0
ファイル: Program.cs プロジェクト: layomia/dotnet_runtime
        static void Validate_StructNotSupported()
        {
            Console.WriteLine($"IDispatch with structs not supported...");
            var dispatchTesting = (DispatchTesting) new DispatchTestingClass();

            var input = new HFA_4()
            {
                x = 1f, y = 2f, z = 3f, w = 4f
            };

            Assert.Throws <NotSupportedException>(() => dispatchTesting.DoubleHVAValues(ref input));
        }