Math.Sign Method returns a value indicating the sign of a decimal number.
using System; class Sample { public static void Main() { short xShort1 = -2; Console.WriteLine(Math.Sign(xShort1)); } }