Lexical' scoping of type parameters in C?

The class G introduces a distinctive naming scope. If you omit the default rules, the 2 versions become.

The class G introduces a distinctive naming scope. If you omit the default rules, the 2 versions become: public F. X F.

X { get; set; } // error public F. X F.G. X { get; set; } // OK.

Thanks, that seems to make a little sense :) And why: class F { class X { } public X X { get; set; } } also fails. – leppie May 13 '10 at 9:06.

X is defined as a type in the scope of F. It is similar to this: class F { public void X(); public int X(); // Bad, trying to redefine X. Class G { public string X(); // OK, different scope } } F.

X isn't out of scope in G, but this doesn't stop G from defining a new X.

Sorry, your X is a member, mine is a type parameter. I can understand that. – leppie May 13 '10 at 8:48 Sorry to be obtuse, @leppie.

Are you agreeing or disagreeing with me? – Marcelo Cantos May 13 '10 at 9:03 I am disagreeing. :) – leppie May 13 '10 at 9:07.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions