tags:

views:

37

answers:

1

public static class EmptyOrNullHelper

public static string EmptyOrNull(this HtmlHelper helper, IQueryable(T) type)
{
//Code
}

}

+3  A: 

Like so:

public static class EmptyOrNullHelper
{

    public static string EmptyOrNull<T>(this HtmlHelper helper, IQueryable<T> type)
    {
        //Code
    }

}

In other words, specify the generic parameter for the method that you want to use in one of its parameters. You'll not need to do this where the method is called normally, just in the declaration.

David M
In other words, in the exact same way you write any generic method.
Matti Virkkunen
@Matti - Indeed.
David M