In C# how do you call one method from another method where both method are inside of the same class?
Experience Level: Junior
When both methods reside inside of the same class, for calling method you just need to write its name followed by rounded brackets. If the method has any parameters, then these parameters need to be provided inside the brackets.
In the following example first the method WriteHello is called with no parameters. Then the method WriteMessage is called with two parameters. The first parameter contains the string "Hello" and the second parameter contains the string "World". The method WriteMessage accepts these two strings and writes each of them on a separate line.