Visual Studio says “Method must have a return type”

Your class is player but the constructor is Player, because they are different it is expecting Player to be a method rather than a constructor

Change the class name to Player and you will be good

Leave a Comment