Anteckning
Åtkomst till den här sidan kräver auktorisering. Du kan prova att logga in eller ändra kataloger.
Åtkomst till den här sidan kräver auktorisering. Du kan prova att ändra kataloger.
When used as the return type for a method, void specifies that the method does not return a value.
void is not allowed in the parameter list of a method. A method that takes no parameters and returns no value is declared as follows:
void SampleMethod();
void is also used in an unsafe context to declare a pointer to an unknown type. For more information, see Pointer types (C# Programming Guide).
void is an alias for the .NET Framework System.Void type.
C# Language Specification
For more information, see the following section in the C# Language Specification:
- 1.6.6 Methods
See Also
Concepts
Reference
Reference Types (C# Reference)
Methods (C# Programming Guide)
Unsafe Code and Pointers (C# Programming Guide)