How can I convert from an ASP.NET Unit structure to int in c#? Or reverse?
If you mean the Unit class:
The Unit class can represent values only between -32768 and 32767.
But it depends if you want the Pixel or Percentage value.
myUnit.Value
will get the value as pointed out.public Unit(int value)
to convert back.
If you mean a uint: there's 2 possible obvious ways:
int n = Convert.ToInt32(myUint);
int n = (int)myUint;