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 124 views
1 answer 167 views
1 answer 128 views
1 answer 172 views
1 answer 141 views
1 answer 149 views
149 views asked Jul 31, 2022 by avibootz
1 answer 150 views
...