How can I convert from an ASP.NET Unit structure to int in c#? Or reverse?
Use Unit.Value property. It will return double and you can cast it to int
Something like (int)xyz.Value
(int)xyz.Value
WEhere xyz is the unit variable
To convert int to unit use new Unit(value)
new Unit(value)