I want to call a function from an .net executable from my own code. I used a reflector and saw this:
namespace TheExe.Core { internal static class AssemblyInfo internal static class StringExtensionMethods }
In the TheExe.Core namespace, this is the function that interests me:
internal static class StringExtensionMethods {
Using this code, I see a Hash method, but what should I call it?
Assembly ass = Assembly.LoadFile("TheExe"); Type asmType = ass.GetType("TheExe.Core.StringExtensionMethods"); MethodInfo mi = asmType.GetMethod("Hash", BindingFlags.Public | BindingFlags.Static); string[] parameters = { "blabla", "MyPassword" };
Remko
source share