How can I convert from an ASP.NET Unit structure to int in c#? Or reverse?
For ASP.NET Unit:
unit.IsEmpty ? 0 : Convert.ToInt32(unit.Value);