Assign Specific Dataype in case of var

73 Views Asked by At

How To assign Specific Data type instead of var in Following case

var provider = CultureInfo.InvariantCulture;
2

There are 2 best solutions below

0
On BEST ANSWER

In visual studio you can see the type when hover on the var keyword :

CultureInfo provider = CultureInfo.InvariantCulture
0
On
CultureInfo nonInvariantCulture = new CultureInfo("en-US");
Thread.CurrentThread.CurrentCulture = nonInvariantCulture;