Question: Consider this example,

```
public class NumberAsIs 
{
    public NumberAsIs(double number) { _number = number; }
    public double Value => _number;
    private double _number;
}

public class Percentage
{
    public Percentage(double number) { _number = number; }
    public double Value => _number * 0.01;
    private double _number;
}

class Program
{
    static void Main(string[] args)
    {
        var a = new NumberAsIs(1);
        var b = new Percentage(2);
        var c = a.Value + b.Value; // Expect c = 1.02
    }
}

```

Because the only purpose of NumberAsIs and Percentage is to call them for their Value method, is there a way to just call them as value types? For example,

```
class Program
{

    static void Main(string[] args)
    {
        var a = new NumberAsIs(1);
        var b = new Percentage(2);
        double c = a + b; // Expect c = 1.02
    }
}

```

I'm not looking to redefine the operator+, but to access the numeric value just by calling the object. If it's not possible just fine and say no, asking just in case there is a workaround/sugar syntax I'm not aware of.

The question is roughly related to this other: [Value type class definition in C#?](https://stackoverflow.com/questions/9297114/value-type-class-definition-in-c)

Answer: 
You can try implementing `implicit operator`:

```
//TODO: better use struct, not class
public class NumberAsIs {
  ...
  public static implicit operator double(NumberAsIs value) => value.Value;
}

//TODO: better use struct, not class
public class Percentage {
  ...
  public static implicit operator double(Percentage value) => value.Value;
}

```

Now you can put

```
var a = new NumberAsIs(1);
var b = new Percentage(2);

// double c = 1.02 as expected
var c = a + b; 

// 0.98
var c2 = a - b;
// 0.02
var c3 = a * b;

```
If you define both directions:

```
public class NumberAsIs
{
    private readonly double _number;
    private NumberAsIs(double d) => _number = d;

    public static implicit operator double(NumberAsIs value) => value._number;
    public static implicit operator NumberAsIs(double value) => new NumberAsIs(value);
}

public class Percentage
{
    private readonly double _number;
    private Percentage(double d) => _number = d/100.0;

    public static implicit operator double(Percentage value) => value._number;
    public static implicit operator Percentage(double value) => new Percentage(value);
}

```

It means you can do this:

```
NumberAsIs a = 1;
Percentage b = 2;
var c = a + b; // Expect c = 1.02
Console.WriteLine(c); //prints 1.02

```