void (C# reference)
You use void
as the return type of a method (or a local function) to specify that the method doesn't return a value.
public static void Display(IEnumerable<int> numbers)
{
if (numbers is null)
{
return;
}
Console.WriteLine(string.Join(" ", numbers));
}
You can also use void
as a referent type to declare a pointer to an unknown type. For more information, see Pointer types.
You cannot use void
as the type of a variable.
See also
Schafft mat eis op GitHub zesummen
D'Quell fir dësen Inhalt kann op GitHub fonnt ginn, wou Dir och Theeme schafen an iwwerpréiwen kënnt an Ufroen unhuele kënnt. Fir méi Informatiounen, gitt op eisen Auteur-Guide.
Feedback
https://aka.ms/ContentUserFeedback.
Geschwënn disponibel: Wärend dem Joer 2024 gi GitHub-Problemer geléist, well de Feedback-Mechanismus fir Inhalt duerch en neie Feedback-System ersat gëtt. Fir weider Informatiounen, gitt op:Ofginn a Feedback uweise fir