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 120 views
1 answer 155 views
1 answer 119 views
1 answer 166 views
1 answer 129 views
1 answer 136 views
136 views asked Jul 31, 2022 by avibootz
1 answer 137 views
...