Konstantin Hadzhiev
Konstantin Hadzhiev

Reputation: 195

C# not detecting and instantiating classes

I started writing a new C# app. I have created a couple of classes that i would like to declare and instantiate in a Form. The thing is, when i write it, the intellisense does not detect it. I will provide a screen shot, as I don't know how to better explain. screenshot of C# not detecting classes

Upvotes: 1

Views: 283

Answers (2)

Omri Aharon
Omri Aharon

Reputation: 17064

DataHelper is defined under the BuildID namespace.

You have 2 options:

The first is to declare it like this:

private BuildID.DataHelper _dataHelper //...;

The second is to add a using BuildID at the top of the page, you can either write it manually or have your cursor on the DataHelper object which is unrecognized (at the moment), press

Ctrl + . and choose the option that the Visual Studio offers you, to add the using statement automatically.

Upvotes: 3

Lakiel Wade
Lakiel Wade

Reputation: 9

I Think to instantiate it you wanna do "Private DataHelper data = new DataHelper();

Upvotes: 0

Related Questions