13 Replies
Well, any method has to have a return type
See how
itemInfo()
says it returns a string
?yes?
are you trying to create a constructor?
Every method has to declare what it returns
for
Menu
If it returns nothing, it can be
void
yes
But it has to be some declaration
$structure
hmmm ok then
If it's a constructor, then it should have the exact name as the class
Constructors - C# programming guide - C#
A constructor in C# is called when a class or struct is created. Use constructors to set defaults, limit instantiation, and write flexible, easy-to-read code.
OHH
same name
ok nvm got it thanks!