why the following statement is perfectly valid one
string a = "someString", b = a, c = a;
but this one does not compile
var a = "someString", b = a, c = a;
another example is here first, an error:
I've seen a similar question here, but the context here is a little bit different:
If
var i = 2, j = 3.4;
is harder for the compiler to 'digest' (even there I don't see a problem to recognize one as int and the other as double), however
var a = "someString", b = a;
should be even less ambiguous, because:
var a = "someString", // here 'a' is inferred to 'string'
so the following
b = a;
should be also inferred to string, because a
has its type already defined...