You could instead of using generics use IConvertible
public static string FormatWithCommaSeperator(IConvertible value)
{
IConvertible convertable = value as IConvertible;
if(value is int)
{
int iValue = convertable.ToInt32(null);
//Return with format.
}
.....
}