CSharp examples for System:Type
Is Integer Type
using System.Threading.Tasks; using System.Text; using System.Runtime.InteropServices; using System.Reflection; using System.Linq.Expressions; using System.Linq; using System.Collections.Generic; using System;//from ww w . ja v a2 s . c om using SafeILGenerator.Ast.Nodes; public class Main{ static public bool IsIntegerType(Type Type) { if (Type == typeof(sbyte) || Type == typeof(byte)) return true; if (Type == typeof(short) || Type == typeof(ushort)) return true; if (Type == typeof(int) || Type == typeof(uint)) return true; if (Type == typeof(long) || Type == typeof(ulong)) return true; return false; } }