r4m0n

Reflection-only interop example

May 21st, 2013
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.36 KB | None | 0 0
  1.             if (part.Modules.Contains("FARWingAerodynamicModel"))
  2.             {
  3.                 PartModule FARmodule = part.Modules["FARWingAerodynamicModel"];
  4.                 FARmodule.GetType().GetField("b_2").SetValue(FARmodule, b_2);
  5.                 FARmodule.GetType().GetProperty("MidChordSweep").SetValue(FARmodule, midChordSweep, null);
  6.             }
Advertisement
Add Comment
Please, Sign In to add comment