So I have created a Windows Form in C#. I have my form, but I then created another class file, and in turn, another class. Back in the form, I want to be able to access my class (called Test).
I’ve tried declaring my class by its name:
Test myclass = new Test();
And I’ve tried simply accessing its method:
Test.Print("helloworld");
However, no matter what I do, I get the error:
The type or namespace name ‘Highlighter’ does not exist in the
namespace ‘Syntax_Highlighting’ (are you missing an assembly
reference?)
So, how do I fix it so I can use my class? My two files share the same namespace (and even adding it as a using directive didn’t fix it).
Post your code (and I might edit when you do) but, first blush, your new class is probably not marked public.