CS0246

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • xx

    CS0246

    Hi,

    The code below is working:

    Main.cs
    -------------

    using System;

    namespace test3
    {
    class zzz
    {
    public static void main()
    {
    vijay.yyy.abc() ;
    }
    {
    }

    namespace vijay
    {
    class yyy
    {
    public static void abc()
    {
    System.Console. Writeline("abc" );
    }
    }
    }

    I want to put the namespace vijay in another document. The code will be:

    Main.cs
    -------------

    using System;
    using vijay;

    namespace test3
    {
    class zzz
    {
    public static void main()
    {
    vijay.yyy.abc() ;
    }
    {
    }

    yyy.cs (the other document)
    -----------
    using System;

    namespace vijay
    {
    class yyy
    {
    public static void abc()
    {
    System.Console. Writeline("abc" );
    }
    }
    }

    I'am getting the following error:

    The type or namespace "vijay" could not be found (are you missing a using
    directive
    or an assembly reference (CS0246)).
    I think it is the assembly reference.If it is so how do i change that.


    Thanks in advance.

    Leo


Working...