I'M trying to learn to program through Mono. I'M using a book on C#. Although it isn't specifically for Mono, I haven't gotten far into the book and it's a really small example so I don't expect that it has any platform specific code. Please see what's wrong with this code.
namespace Song
{
class ThisOldMan
{
static void Main(string[] args)
{
doVerse(1);
doChorus();
doVerse(2);
doChorus();
}
static void doChorus()
{
string message = "";
message += "\n...With a knick-knack paddy whack\n";
message += "Give a dog a bone\n";
message += "This old man came rolling home.";
message += "\n\n";
} // end doChorus
static void doVerse(int verseNum)
{
string message = "";
message += "This old man, he played ";
message += verseNum;
message += ", \nHe played knick-knack ";
message += getPlace(verseNum);
Console.WriteLine(message);
} // end verse
static string getPlace(int verseNum)
{
string message = "";
switch(verseNum)
{
case1:
message = "on mu thumb ";
break;
case2:
message = "on my shoe ";
break;
default:
message = "not yet defined";
break;
} // end switch
return message;
} // end getPlace
static void pause()
{
Console.ReadLine();
}
}
}