This may sound like a bizarre question coming from me, but can somebody with VB and C# experience tell me whether it is EVER reasonable to have a class with a public data member and a public property with the same name (the property takes an argument, too, and the two are totally unrelated in purpose)? It's a really bad idea, and it shouldn't compile because of the ambiguity in the name, but I have run into something like this. I have a suspicion that the code might have been written in a different language, which is quite possibly C#, and was run through a pretty bad language translator. What I am really wondering is whether or not there is anything that can be done validly in C# that could be poorly, and automatically, translated in such a way that it would result in the situation I described?
↧