Why it is possible to access private const field from attribute?

Viewed 168

How is it possible?

namespace test
    {
        class Attr:Attribute
        {
            public Attr(int e)
            {
            }
        }

        [Attr(E)]
        class Test
        {
            private const int E = 0;
        }
    }

Doesn't it violate encapsulation principle?

1 Answers
Related