My first OOP bug ( please help) - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

My first OOP bug ( please help)

Zorro26Zorro26 Posts: 21Member
Here is the code:

[code]
using System;

namespace ThisOldMan
{
class ThisOldMan
{
static void main(string[] args)
{
doVerse(1);
doChorus();
doVerse(2);
doChorus();
}// end main

static void doChorus()
{
string message = "";
message += "
...With a knick-knack paddy whack
";
message += "Give a dog a bone
";
message += "This old man came roling home.";
message += "

";
System.Console.WriteLine(message);
}// end doChorus()

static void doVerse(int verseNum)
{
string message = "";
message += "This old man, he played ";
message += verseNum;
message += ".
He played knick-knack ";
message += getPlace(verseNum);
Console.WriteLine(message);
}// end verse

static string getPlace(int verseNum)
{
string message = "";
switch (verseNum)
{
case 1:
message = "on my thumb ";
break;
case 2:
message = "on my shoe ";
break;
default:
message = "not yet defined";
break;
}// end switch
return message;
}//end getPlace
}// end class
}// end namespace
[/code]

Here is the error message VS2008 gives me on compilation:

Error 1 Program 'C:UsersShalomDocumentsVisual Studio 2008ProjectsC#SongSongobjDebugSong.exe' does not contain a static 'Main' method suitable for an entry point Song

Thanks in advance


Comments

Sign In or Register to comment.