Project Euler – IProblemBase


I have noticed people searching for my IProblemBase class. There is really nothing to it to be honest. I just have all my Problem[n] classes implement it so that my test harness can call them easily. What I really need to publish is my BigInt class that most of the solutions I do publish use. Sorry, it needs some polish so its going to be a while for that one.

IProblemBase

namespace Euler
{
    public interface IProblemBase
    {
        string GetAnswer();
      
    }
    
}

Program

namespace Euler
{
    class Program
    {
        static void Main(string[] args)
        {            
            IProblemBase p = new Problem48();
            string answer = p.GetAnswer();
            //etc.....
        }
        
    }
    
}
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: