public class CPPDLL
{ [DllImport("cv.dll",EntryPoint = "add")]
public static extern int add(int x, int y);
}
class Program {
static void Main(string[] args)
{
int result = CPPDLL.add();
Console.WriteLine("10 + 20 = {0}", result);
Console.ReadLine(); }
}
form.
int result = CPPDLL.add();