You learn something new everyday…

I was working on a simple demo application and had a method with a void signature:

static void Test() { … }

Messing around with the code, I decided to return System.Void at the end of my method instead of leaving the method without a return type or the return statement.  To my surprise, these are the errors that I received from the compiler:

System.Void cannot be used from C# -- use typeof(void) to get the void type object.

Pretty interesting, huh?  I should have guessed that there was an issue with this type in the IDE when I didn’t get it through Intellisense.  It’s not a big issue, just realized that my random thought does not apply here.