If the method is not returning any values, then the return type is void. The return type is the data type of the value the method returns. Return type − A method may return a value. The syntax for defining a method in C# is as follows −įollowing are the various elements of a method −Īccess Specifier − This determines the visibility of a variable or a method from another class. When you define a method, you basically declare the elements of its structure. Every C# program has at least one class with a method named Main. A method is a group of statements that together perform a task.