2012-05-21 83 views

回答

3

@ user287107接近,但是這是什麼工作:

Dim ass As Assembly = Assembly.Load("AssemblyNameWhereModuleResides") 
    Dim moduleType as Type = ass.GetType("MyNameSpaceIfApplicable.MyModuleName") 
    moduleType.GetField("field").SetValue(Nothing, newValue) 
5

我認爲它應該是非常相似的C#代碼

objectwithfield.GetType().GetField("field").SetValue(objectwithfield, newValue)