I want to be able to use this COM class as if it were a static class, and call methods / functions statically from a VB6 application. Here is my current class:
using System;
using Linq;
using System.Runtime.InteropServices;
namespace VNDBUtils
{
[ComVisible(true)]
public static class BracketString(){
[ComVisible(true)]
public static string HellowWorld(){
get{
return "Hello World";
}
}
}
}
This is the way I am currently calling the class in VB6, I am creating an object of the class and calling it this way. However now that the class is static I am unsure as to the exact syntax to use.
I originally thought it could be called using the following syntax:
Dim test As VNDBUtils
test.BracketString.HelloWorld();
However this is giving me an error, so if someone could give me an example of how I can call this class statically from a Visual Basic 2006 application. Thanks!