문제

Is it possible somehow to access non-public properties in Silverlight? Maybe using reflection?

I've tried following steps:

  1. Get class type
  2. Get property info by prop name
  3. prop.GetValue(obj, null)

It says: MethodAccessException... A there any ways to workaround/(go another way) ?

도움이 되었습니까?

해결책

Officially, you will need to run the browser in elevated permissions in order to access private/protected members. With normal privileges reflection will only get you access to the members in the same assembly.

http://msdn.microsoft.com/en-us/library/stfy7tfc(v=vs.95).aspx

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top