What is System.Void?

前端 未结 4 824
不知归路
不知归路 2020-12-01 07:28

I know that methods declared with void does not return anything.

But it seems that in C# void is more then just a keyword, but a

4条回答
  •  日久生厌
    2020-12-01 08:00

    Beyond not returning a value, very little definition is given of void (although void* gets some attention) in the language spec. This isn't really a language concern - although the CLI may define it further.

    Ultimately though: because it has no meaning to do new void()

提交回复
热议问题