You were definitely closer with your second attempt as you can't load a .NET assembly as if it was a normal C-style DLL. If you're getting "Class not registered" error messages in Delphi it simply means the required registry entries were not available.
To use your C# class as a COM object, the best thing to do is put all your methods in one or more interfaces then make the class implement each of those interfaces. Example:
C# code
// IAddInterface.cs
public interface IAddInterface
{
int Add(int i1, int i2);
}
------解决方案-------------------- 编译问题。把C#文件编译成本地的二进制代码。应该就可以调用了。 网上搜索一下C#二进制编译器看看吧。我是菜鸟,提个建议。
------解决方案-------------------- 如果要考虑用其它语言如VB、VC、DEPHI调用,不要用C#等.NET环境语言开发动态类库。