G
G
Grandma Luda2021-09-25 19:28:15
C++ / C#
Grandma Luda, 2021-09-25 19:28:15

How to find out the data type of a variable?

How to find out the data type of a variable?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vasily Bannikov, 2021-09-25
@KirasiH

var x = 42;
var xType = x.GetType();
Console.WriteLine(xType.Name); // Int32

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question