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!


Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

My first OOP bug ( please help)

Zorro26Zorro26 Posts: 21Member
Here is the code:

using System;

namespace ThisOldMan
class ThisOldMan
static void main(string[] args)
}// 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 += "

}// 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);
}// end verse

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

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


  • Zorro26Zorro26 Posts: 21Member
    I solved that already:

    I have just forgot to place capital M in Main and that's all.
    Thank you Google :)
Sign In or Register to comment.