Public Function Add (ByVal x As Integer, ByVal y As Integer) As Integer Add = x + y End Function
tlbimp VBServer.dll /out:NetClient.dll
gacutil /i NetClient.dll
csc TestClient.cs /r: NetClient.dll
namespace Addvbserver { using System; using NetClient; public class TestClient { public static int Main(string[] args) { Add c = new Add(); Console.WriteLine(c.Add(2,2)); return 0; } } }
namespace Addvbserver { using System; using NetClient; public class Client { public static int Main(string[] args) { Add c = new Add(); _Add gg =c; Console.WriteLine(gg.Add(2,2)); return 0; } } }
Build Your Own ASP.NET Website Using C# & VB.NET