April 2013
Intermediate to advanced
1700 pages
92h 51m
English
To define overloads for a method with a given name, you just define all the overloads as part of the same containing type. Where you put the method in the file (or files, in case partial classes are used) doesn’t matter, though keeping overloads of a method lexically together helps when browsing the code.
Note: A Word on Naming Conventions for Methods
Talking about method naming as the grouping key for a set of overloads, it’s good to say a word or two on the conventions in use for method names. Basically, they follow the so-called Pascal naming convention, where they start with an uppercase letter and each word starts with a capital too. For example, TryParse and WriteLine are conventional names, whereas tryParse
Read now
Unlock full access