Hi all,
Firstly sorry for asking you genius programmers with help on something which is probably trivial to you.
I have just started to learn c# and was doing really well until I got to a section within the book which I simply can't get my head around.
The code...
class Talker {
public static int BlahBlahBlah (string thingToSay), int numberOfTimes) {
string finalString = "";
for (int count = 1; count <= numberOfTimes; count++) {
finalString = finalString + thingToSay + "\n";
}
MessageBox.Show(finalString);
return finalString.Length;
I know how this connects to the external front end but really need some expert help on what is going on in the method. I know it is a lot to ask but I just need a idiots guide, step by step, so I can follow whats going on.
Any help guy would really be appreciated.
Cheers
Firstly sorry for asking you genius programmers with help on something which is probably trivial to you.
I have just started to learn c# and was doing really well until I got to a section within the book which I simply can't get my head around.
The code...
class Talker {
public static int BlahBlahBlah (string thingToSay), int numberOfTimes) {
string finalString = "";
for (int count = 1; count <= numberOfTimes; count++) {
finalString = finalString + thingToSay + "\n";
}
MessageBox.Show(finalString);
return finalString.Length;
I know how this connects to the external front end but really need some expert help on what is going on in the method. I know it is a lot to ask but I just need a idiots guide, step by step, so I can follow whats going on.
Any help guy would really be appreciated.
Cheers