Collapse the table of content
Expand the table of content
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here. ArchiveDisclaimer


When used as the return type for a method, void specifies that the method does not return a value.

void is not allowed in a method's parameter list. A method that takes no parameters and returns no value is declared as follows:

void MyMethod();

void is also used in an unsafe context to declare a pointer to an unknown type. For more information, see A.2 Pointer types.

See Also

C# Keywords | Reference Types | Value Types

© 2015 Microsoft