I'm trying to work with a C# DLL on Python. The code used to create to C# DLL is included with this question.
from ctypes import*
mydll = cdll.LoadLibrary("Z:\\9. Personal\\Jeet\\New
folder\\ClassLibrary1.dll")
mydll.Add(3,4)`
The code doesn't work and the error is:- AttributeError: function 'Add' not found
Is there any alternative? Iron Python is installed on the PC I'm using but I have never used it. Please give me a detailed answer with all steps.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ClassLibrary1
{
// Interface declaration.
public interface ICalculator
{
int Add(int Number1, int Number2);
};
public class Class1 : ICalculator
{
public int Add(int Number1, int Number2)
{
return Number1 + Number2;
}
}
}