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?
An extension method is automatically part of a static class. This means that the consumer can use either the extension methods or call the static method from the class if she wants it. I use extension methods as much as I can, they are easier to discover if they're put in the proper namespace.