How to set hexadecimal value to int variable in C#

1 Answer

0 votes
using System;

public class Example
{
	public static void Main(string[] args)
	{
		int hex = 0x1F;

		Console.WriteLine(hex);
	}
}




/*
run:
  
31
  
*/

 



answered Jul 20, 2022 by avibootz

Related questions

1 answer 211 views
1 answer 255 views
1 answer 210 views
1 answer 260 views
1 answer 230 views
1 answer 243 views
243 views asked Jul 31, 2022 by avibootz
1 answer 243 views
...