class Digit
{
public double val;
public Digit(double d)
{
val = d;
}
public static implicit operator double(Digit d)
{
return d.val;
}
public static implicit operator Digit(double d)
{
return new Digit(d);
}
}
class Program
{
static void Main(string[] args)
{
Digit dig = 2.1d;
double d = dig;
}
}