August 2017
Beginner
566 pages
12h 34m
English
We'll create one method; so type the following within the curly braces below static class StringUtil:
public static string Reverse(string s)
The name of our method is Reverse. It produces a string and it operates on a string. It's static, which means that we'll be able to call it by writing the name of the class and then the name of the method—we'll see that momentarily. Here, public of course means that it's accessible in code outside of the class.
Let's add a few comments above this line, starting with comment 5, to see what we've created here. Type the following:
//5. Public means reachable anywhere//6. static means we can call the method by writing: StringUtil.Reverse//7. string is what we're going to produce ...
Read now
Unlock full access