Sunday, March 20, 2011

Could not find 'Program' specified for Main method

This error message occurs when we define in our project settings -> Application -> Startup object a reference to an non-existing class.

We usually encounter this error after renaming our main project's namespace. Visual Studio's rename command won't change your Startup object to the newly renamed class, so make sure you change it to the new namespace after the rename!

Frequent error messages:
Could not find 'Program' specified for Main method
Could not find 'Shell.App' specified for Main method

Thursday, March 17, 2011

Greplin Challenge Solution

After reading this article in Calcalist, I was impressed by the startup and decided to visit greplin.com.
After a quick glance @ the site, I found a very nice programming challenge here.

The challenge consists of 3 levels. Each level is a riddle that needs to be solved by programming. To pass a level, we need to find the correct answer for the riddle, and enter it in the challenge page.

It took me about a hour and change to solve it. It was very fun and I recommend you to try it out :-).

For those who don't feel like busting their brains out for the solutions, here's my code for the solution.

Also here's a screenshot for the simple UI I've created to test the solutions.