Create a .NET dll
-
I have a problem while making dll. i write methods in to dll and on my project i give reference and task(i am sure that i have no mistake at using dll part) but i when i use dll method debugger gives me this method is in (ExDll.dll) how can create a methods in dll, can any one give me step by step solution. Thanks Best Regards
-
I have a problem while making dll. i write methods in to dll and on my project i give reference and task(i am sure that i have no mistake at using dll part) but i when i use dll method debugger gives me this method is in (ExDll.dll) how can create a methods in dll, can any one give me step by step solution. Thanks Best Regards
Create a dll project add a method compile Unless there's something you're not telling us, there are no special steps required. What is your problem ?
Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog
-
Create a dll project add a method compile Unless there's something you're not telling us, there are no special steps required. What is your problem ?
Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog
I assumed that i have added a method but after i included it vs doesnt see this method here is the dll code
using System; using System.Collections.Generic; using System.Text; namespace ExDLL { public class Class1 { public static int ExMethod(int a, int b) { return a + b; } } }
Thanks, i wait your reply -
I assumed that i have added a method but after i included it vs doesnt see this method here is the dll code
using System; using System.Collections.Generic; using System.Text; namespace ExDLL { public class Class1 { public static int ExMethod(int a, int b) { return a + b; } } }
Thanks, i wait your replyThe line ExDLL.Class1.ExMethod(1, 2) will return 3, if you have a reference to the DLL in your project. The most common mistake here, is to forget about scoping the namespace, either directly or with a using statement.
Christian Graus - C++ MVP 'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
-
The line ExDLL.Class1.ExMethod(1, 2) will return 3, if you have a reference to the DLL in your project. The most common mistake here, is to forget about scoping the namespace, either directly or with a using statement.
Christian Graus - C++ MVP 'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
-
Hello; In .net side, after i add reference to dll, should i use it like int r = ExDLL.Class1.ExMethod(3,4);
Yes, unless you have using ExDLL inside the class.
Christian Graus - C++ MVP 'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert