4 ms·
I'm afraid <> is too ingrained at this point to turn around, but seriously; is it such a problem? In C# a template can show up in a class like: public class F
by danssig 16y ago
I'm afraid <> is too ingrained at this point to turn around, but seriously; is it such a problem? In C# a template can show up in a class like:
public class Foo<T> { ...
a method like:
public void EatAFoo<T>(...
and usage like:
var f = new Foo<int>();
someObj.EatAFoo<int>(...
I don't see how any of these cases could be confused with a greater than or less than operator. Could you expand on where the problem comes in?
- primodemus 16y agoThe statement: F(G<A, B>(7)); could be interpreted as a call to F with two arguments, G < A and B > (7). Alternatively, it could be interpreted as a call to F with one argument, which is a call to a generic method G with two type arguments and one regular argument. See the C# specification section 9.2.3 (grammar ambiguities) for more details: http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-334.pdf http://www.ecma-international.org/publications/files/ECMA-ST...