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