How do I get class of an internal static class in another assembly?

Posted by Echiban on Stack Overflow See other posts from Stack Overflow or by Echiban
Published on 2010-04-19T06:53:48Z Indexed on 2010/04/19 7:03 UTC
Read the original article Hit count: 197

Filed under:
|

I have a class C in Assembly A like this:

internal class C
{
  internal static string About_Name {
      get { return "text"; }
  ...
}

I have about 20 such static properties. Is there a way, in an outside assembly, without using friend assembly attribute (.Net reflection only), get class C so I can invoke any of the static string properties like this:

Class C = <some .Net reflection code>;
string expected = C.About_Name;

If that is not possible, a .Net reflection code to get the string property value directly will suffice, but not ideal.

Thanks in advance!

© Stack Overflow or respective owner

Related posts about .NET

Related posts about reflection