How to use class from other files in C# with visual studio?

前端 未结 6 903
孤独总比滥情好
孤独总比滥情好 2020-12-29 04:51

I am a newbie of C# and MS visual studio, and I want to use the C# class which defined in another file, but can\'t get it work.

Here is the program.cs

6条回答
  •  伪装坚强ぢ
    2020-12-29 05:24

    Yeah, I just made the same 'noob' error and found this thread. I had in fact added the class to the solution and not to the project. So it looked like this:

    Wrong and right description

    Just adding this in the hope to be of help to someone.

提交回复
热议问题