private readonly int _value;
public Temperature(int value)
public static implicit operator int(Temperature t) => t._value;
public override string ToString() => _value.ToString();
private readonly int _value;
public Velocity(int value)
public static implicit operator int(Velocity t) => t._value;
public static void Main()
var t1 = new Temperature(30);
var t2 = new Temperature(20);
var temps = new[] { t1, t2 };
var orderedTemps = temps.OrderBy(t => t).ToList();
Console.WriteLine($"{t1}, {t2}");