Null-Coalescing Operator and Extensions

SG sg at g.com
Sat Aug 25 13:33:58 UTC 2018


Hi,

1) I program in C# and I'm wondering if there is something like 
?? (Null-Coalescing Operator) in D? (I remember some proposals in 
the past).


2) Is possible to create Extensions like in C#?

For example:

public int StrToInt (this string s){
    return int.Parse(s);
}

var i = "123456".StrToInt();

Thanks.


More information about the Digitalmars-d-learn mailing list