static void DemoClassMarshalling() { var time = new SystemTimeClass(); // Had the time been a struct, the system time would not have been reflected by it because it's passed by value. GetSystemTime(time); Console.WriteLine($"The time is {time}"); }
static extern void GetSystemTime(SystemTimeClass time);