Mega Code Archive

 
Categories / C# Book / 01 Language Basics
 

0100 Methods

Fields are the data of a type(class) while the methods define the behaviours. A method contains a series of statement. A method can also get input from outside by declaring parameters and output to outside by returning value. The void return type indicates that no value will return from the method. A method's signature is its name and parameters' type. A method's signature must be unique within its type(class). A method can have the following modifiers: static public internal private protected new virtual abstract override sealed unsafe extern