I have a C++ DLL and I need to get it's methods in my C# app, but I am not able to get the methods.
This is my code: I try to convert C++ Dll to byte array and get it's methods.
byte[] data = File.ReadAllBytes(@"C:\test.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);
}
}