namespace
Hi everybody. I think it is quite silly that I ask this question, but, it is really a big problem for me.
I have been trying to write 2 classes declaring namespace.
//Compile using --> csc /target:library myClass.cs
namespace testing{
public class myClass{
public string myFunc(){ return "Returned String"; }
}
}
//End of myClass
//Compile using --> csc testMyClass.cs
using System;
using testing;
public class testMyClass{
public static void Main(String[] args){
myClass mc = new myClass();
Console.Writeline(mc.myFunc());
}
}
//End of testMyClass
When compile the testMyClass.cs, compiler complains that it couldn't find the namespace 'testing' with the bracket "are you missing a using directive or an assembly reference". Why is that so? Do I need to set any classpath like in Java? If not, how should I solve this problem? Anyone please help....
Nelson Chan
|