Decimal To Hex - CSharp Language Basics

CSharp examples for Language Basics:int

Description

Decimal To Hex

Demo Code


using System.Threading.Tasks;
using System.Text;
using System.Linq;
using System.Collections.Generic;
using System;//from   www .j  a  v  a  2  s .  c  o m

public class Main{
        public static string DeciToHex(int decimalNumber)
        {
            return decimalNumber == -1 ? "-1" : decimalNumber.ToString("x");
        }
}

Related Tutorials