C# C# Objects Object-Oriented Programming Fields

Compiler error CS0246

game.cs(7,7): error CS0246: The type or namespace name Map' could not be found. Are you missing an assembly reference? game.cs(9,7): error CS0841: A local variablemap' cannot be used before it is declared game.cs(10,7): error CS0841: A local variable map' cannot be used before it is declared game.cs(12,18): error CS0841: A local variablemap' cannot be used before it is declared

Yes, all namespaces are identical in spelling.

1 Answer

Steven Parker
Steven Parker
174,022 Points

When you build, did you include all sources? A typical build command might be:

mcs -out:TreehouseDefense.exe *.cs

If that's not it, please make a snapshot of your workspace and post the link to it here to facilitate a complete analysis.