I have a c++ dll and I need to have it's methods in my c# app. but I can't get all methods in that dll. this is my code:
byte[] data = File.ReadAllBytes(@"C:\ODSSwitchFunctions.dll");
var result = data.GetType();
foreach (Type type in result.Assembly.GetTypes())
{
if (!type.IsPublic)
{
continue;
}
MemberInfo[] members = type.GetMethods();
foreach (MemberInfo member in members)
{
Console.WriteLine(member.Name);
}
}
Aucun commentaire:
Enregistrer un commentaire