Question: > 
> **Possible Duplicate:**  
> 
> [Extension Methods vs Static Utility Class](https://stackoverflow.com/questions/4646328/extension-methods-vs-static-utility-class) 
> 
> 
> 

I am building an API of general functions which perform actions based upon objects in .NET. For example; I have created a function that checks a string to see if it is an email address.

I could either have:

```
static bool IsEmailAddress(string text)
{
    return IsMail(text);
}

```

or I could create an extension method that would be used like so: 

```
string text = "HelloWorld@Email.com";
if (text.IsEmailAddress())
{
}

```

which is more suitable, or do you think since this is a general purpose library, I could technically implement it both ways and allow the developer to decide which is best for them?

Answer: 
The question is which .NET Framework will you target? If < 3.5 then extension methods are not available. Otherwise, why would you create a new class?
Extension methods allow developers to not be aware exactly what the helper class is called and where it is located, not to mention the very fact of its existence. Do note, that you still need to put their namespace in `using` clause - perhaps place them in some common, top-level namespace for your application.