creating a new type
how do Integers for example do it, that they are a struct under the hood but instead of calling a constructor like they can be assigned like
int constructor is never called when you do . Again ints are special.Exaample(5)explicitimplicitExample e = (Example)5;int i = 0;Example e = 5;
Console.WriteLine(e);
public readonly struct Example {
private readonly int value;
public Example(int value) {
this.value = value;
}
public override string ToString() => $"Exaample({value...
public static implicit operator Example(int value) => ...
}