IsInteger
Checks whether the type is integer.
Source
public static bool IsInteger(this Type type)
{
return type.Equals(typeof(int));
}
Example
Type type = (1).GetType();
bool isString = type.IsInteger();
ExtensionMethod.NET Home of 880 C#, Visual Basic, F# and Javascript extension methods
Checks whether the type is integer.
public static bool IsInteger(this Type type)
{
return type.Equals(typeof(int));
}
Type type = (1).GetType();
bool isString = type.IsInteger();