private static void TestClassBlittalbe() { ManagedClassBlittable blittableObject = new ManagedClassBlittable(); blittableObject.IntValue = 1; blittableObject.ShortValue = 2; blittableObject.FloatValue = 3; blittableObject.DoubleValue = 4.5; TestStructArgumentByRef(blittableObject); Console.WriteLine("\n�ṹ�������ݣ�int = {0}, short = {1}, float = {2:f6}, double = {3:f6}", blittableObject.IntValue, blittableObject.ShortValue, blittableObject.FloatValue, blittableObject.DoubleValue); }
private static extern void TestStructArgumentByRef(ManagedClassBlittable argClass);
private static extern void TestReturnStructFromArg(out ManagedClassBlittable outObject);