Creating An Utilities Class?

Posted by Soo on Stack Overflow See other posts from Stack Overflow or by Soo
Published on 2010-05-18T13:50:41Z Indexed on 2010/05/18 14:00 UTC
Read the original article Hit count: 215

Filed under:
|
|
|

Hello SO,

I'm very new to OOP and am trying my hardest to keep things strictly class based, while using good coding priciples.

I'm a fair ways into my project now and I have a lot of general use methods I want to put into an utilities class. Is there a best way to create an utilities class?

public class Utilities
{
    int test;

    public Utilites()
    {
    }

    public int sum(int number1, int number2)
    {
        test = number1+number2;
    }
    return test;
}

After creating this Utilities class, do I just create an Utilities object, and run the methods of my choosing? Do I have this Utilities class idea correct?

© Stack Overflow or respective owner

Related posts about c#

Related posts about Utilities