© Mikael Olsson 2020Mikael OlssonC# 8 Quick Syntax Referencehttps://doi.org/10.1007/978-1-4842-5577-3_9
Methods are reusable code blocks that will only execute when called.
A method can be created inside a class by typing void followed by the method’s name, a set of parentheses, and a code block. The void keyword means that the method will not return a value. The naming convention for methods is the same as for classes – a descriptive name with each word initially capitalized.
All methods in C# must belong to a class, and they are the only place where statements may be executed. C# does not have global functions, ...