Innovenergy_trunk/csharp/Lib/Utils/Units.cs

15 lines
523 B
C#

namespace InnovEnergy.Lib.Utils;
public static class Units
{
public static String Unit(this Object v, String unit) => $"{v} {unit}";
public static String V(this Object v) => v.Unit("V");
public static String W(this Object v) => v.Unit("W");
public static String A(this Object v) => v.Unit("A");
public static String Degrees(this Object v) => v.Unit("°");
public static String Celsius(this Object v) => v.Unit("°C");
public static String Percent(this Object v) => v.Unit("%");
}