CSharp examples for System.Reflection:Modifier
Is Unsigned
using System.Threading.Tasks; using System.Text; using System.Runtime.Serialization; using System.Runtime.CompilerServices; using System.Reflection.Emit; using System.Reflection; using System.Linq; using System.IO;//from w w w. j av a2s . c om using System.Globalization; using System.Collections.Generic; using System; public class Main{ public static bool IsUnsigned(this Type t) { return !t.IsSigned(); } public static bool IsSigned(this Type t) { return t == typeof(sbyte) || t == typeof(short) || t == typeof(int) || t == typeof(long); } }