Simple namespace problem

  • Thread starter Thread starter Raheel
  • Start date Start date
R

Raheel

Hi,
I have a bunch of classes that are named c1.cs, c2.cs, c3.cs. The
c1, c2, c3 C# files are in the namespace name1.name2 {.
In c1 class I refer to the class c2. I am compiling these cs files
into a single assembly, like this : csc /t:library
/out:bin/name1.name2.dll c1.cs c2.cs c3.cs.
However, I am getting a compile time error in c1 here, saying that it
cant find c2.
What am I missing?
 
Hiya,

Can you post your code definition (i.e the definition of
your classes and methods without the implementation), it's
quite difficult to say what is the problem without having
further info.

If you can't then can you supply the following data:

1. Is class c1 marked as public?

2. Is class c1 marked as static?

3. How do you refer to c1 from c2?

Cheers, Nir.
 
hi.
have you try to add this :

using name1.name2;

in the top of your code of C1 class ?

Hope that's help
ROM
 
Back
Top