c# - Get struct within a struct using reflection -
I'm having trouble reaching a strait within the struct
namespace something. Name Space ToAccess {public structure howto {public key string} some_Static_Strings = "redudantString"; Public const string SomeOtherStatic_Strings = "someOtherRedundantString"; Public Control String Option 3 = Some Options "; Public Structure Access ME {Public Static Readonly String Open 1 = 1 Towstring; Public Static Readonly String OPTION2 = 2.toString; Public Static Reidonline String Opin 3 = 4.toastring; Public Static Readonly String OPTION0 = 0 toasting; Fixed AccessMe () {}}}} I have seen other similar questions, but I also have to Instead of using Tibimb, I am loading the assembly on the runtime, the content of a particular straight at runtime, so I have no reference to the library to retrace which I am repeating before the runtime. This is similar to my problem, although I can not do
fieldInfo FI = typeof (HowTo) .GetType (.) GetField ("archive", BindingFlags.Public | BindingFlags.Instance); Because I need to type first, though it Minister does not work
var result = _someClass.PreLoadedAssembly.GetType ( "something. Namesspace.ToAccess.HowTo"). GetField ("AccessMe", Bin Dingflags. Public | BindingFlags.Instance); (preloaded assembly I have been loaded on runtime and stored in _someclass)
Any help would be appreciated because I could not find much distance is. Thank you
You should use the method:
_someClass.PreLoadedAssembly GetType ("Some .NameSpace.ToAccess.HowTo") .GetNestedType ("AccessMe");
Comments
Post a Comment