Home > other >  VS Code showing problem "The type <classname> is already defined"
VS Code showing problem "The type <classname> is already defined"

Time:07-30

In the problems panel in VS Code i keep getting "The type is already defined" this error message. But when I open the file the error disappears.

I know this is not an issue but the red marks bothers my eyes. These error messages may be due to same class, as every file is saved in same folder, I dont know.

Is there a solution to fix all in once.

enter image description here

CodePudding user response:

if all of the classes are in the same folder, there may be duplicate classes. Thus, place all the different project classes within the different folders may solve the problem.

  • Related