[Saturday 19 February 2005 13:56] Mario Sopena
(Re: [Mono-list] Const weirdness, revisited...):> > const int meh = 5; > > meh = 10; > > I have tested with mono 1.0.5 and it compiles, but, at runtime, the > line meh=10 doesn't make anything (you can test it yourself adding > Console.WriteLine), the value of meh doesn't change. Right. Why didn't I even think of testing it a tad more thoroughly... > But, the Microsoft compiler argues by saying: > "error CS0131: The left-hand side of an assignment must be a > variable, property or indexer" > on the line meh=10. Exactly, I *did* check on that. I would expect the same behaviour from Mono, and I think it's quite an obvious bug indeed (i.e. I cannot think of any rational decision that might have been made about this). Thanks, Tom -- key: http://tmp.verbreyt.be/files/abwaerts.asc
pgpMErvRGpoRB.pgp
Description: PGP signature
