VAR.WebFormsCore: Implement Unit.ToString()

This commit is contained in:
2021-06-29 08:32:46 +02:00
parent fcddf7b647
commit c73dbbffe3

View File

@@ -10,6 +10,21 @@
_value = value;
_unitType = type;
}
public override string ToString()
{
if (_unitType == UnitType.Pixel)
{
return string.Format("{0}px", _value);
}
if (_unitType == UnitType.Percentaje)
{
return string.Format("{0}%", _value);
}
return string.Empty;
}
}
public enum UnitType