I was looking at definition for void
type in C#. It's an empty structure that represents a no value.
But, what is exactly the difference between this structure and others. I mean If you define a method with return type of void and then you return typeOf(void)
you will get an error.
It seems that C# have different behavior with this type.
There is a little documentation of what void
really is. I mean what's going on under the hood. how can a value type structure refer to nothing ?
UPDATE:
I think that some of you guys didn't get the point of this question and this is why you marked it as duplicate. My question is. Void is an structure. OK ? .. Structures are value types. In the lowest possible stage what happens ? what void represents in memory? What is the difference between this structure and others while if you press F12 on void you see only an empty structure ? Where c# makes this difference ?