
上QQ阅读APP看书,第一时间看更新
Ending a method definition using curly braces
At the beginning of Chapter 3, Getting into the Details of Variables you learned about C# statements and the requirement to end them with a semicolon. A method definition has a different requirement.
A method definition ends with a code block between a pair of curly braces. DO NOT end a method definition with a semicolon.
If you do accidentally place a semicolon at the end, MonoDevelop will gladly remind you with an error message that you're not supposed to use a semicolon at the end of a method definition.