Well I think that should not be to dificult. You can use DllImport statement to call any c++ dll library or function.
For example you have following c++ function in a dll.
int Sum(int x, int y) { return x+y; }
And you want to use this function in c# application. So you can useit like this.
using System; using System.Collections.Generic; using System.Text; using System.Runtime.InteropServices; //For "DllImport" namespace MyCSharp { class Program { [DllImport("MathFuncsDll.dll", CharSet = CharSet.Auto)] public static extern Int32 Sum(Int32 a, Int32 b); static void Main() { Console.WriteLine(Sum(3, 4)); } } }
Markdown for AI
A clean, structured version of this page for AI assistants and LLMs.
We use cookies to ensure you have the best browsing experience on our website. By using our site, you
acknowledge that you have read and understood our
Cookie Policy &
Privacy Policy.
Well I think that should not be to dificult. You can use DllImport statement to call any c++ dll library or function.
For example you have following c++ function in a dll.
And you want to use this function in c# application.
So you can useit like this.