I have Two classes. Test.cs, Entity.cs.
I have put this two files in one folder "CommandTest".
*Test.cs Class
namespace Demo
{
public class Test
{
public static Entity entity= new Entity();
public static void Main(string[] args)
{
Console.WriteLine("Demo");
}
*Entity.cs class
namespace Demo
{
public class Entity
{
Console.WriteLine("entity");
}
}
When I am Trying to run it through "Visual Studio Command Prompt". It shows Error,
Test.cs(10,28): error CS0234: The type or namespace name 'Entity' does not exist in the namespace 'Demo' (are you missing an assembly reference?)
I am not getting why it is shows error. Because both class have same namespace. How can I run it through Command Prompt.
Thanks.
Entity.cs. It needs to be explicitly told about all necessary files, it won't just search a directory (as far as I am aware).