Hex To Decimal - CSharp System.IO

CSharp examples for System.IO:Hex

Description

Hex To Decimal

Demo Code


using System.Threading.Tasks;
using System.Text;
using System.Linq;
using System.Collections.Generic;
using System;//from w  ww.ja  v  a 2s . c  om

public class Main{
        public static int HexToDeci(string hexaDecimalNumber)
        {
            return hexaDecimalNumber == "" || hexaDecimalNumber == "-1" ? -1 : Convert.ToInt32(hexaDecimalNumber, 16);
        }
}

Related Tutorials