473,324 Members | 2,400 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

CS0246

Leo
The code bellow is working when i put it all in 1 document:

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 namespace vijay in antother 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");
}
}
}

Getting the 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 an assembly reference is, how do i change this?

Thanks in advance

Leo van den Berg
Nov 25 '05 #1
1 1539
I noticed two Main.cs files. Have you set a reference to the assembly
containing the vijay namespace?

--------------------------------------------------------------------------------
All that glitters has a high refractive index.
www.mendhak.com
"Leo" <Le*@discussions.microsoft.com> wrote in message
news:A6**********************************@microsof t.com...
The code bellow is working when i put it all in 1 document:

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 namespace vijay in antother 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");
}
}
}

Getting the 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 an assembly reference is, how do i change this?

Thanks in advance

Leo van den Berg

Nov 25 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Joe DeAngelo | last post by:
When I try to compile a source code which should normally run I got this error message error CS0246: The type or namespace name 'XmlSchemaSet' could not be found (are you missing a using...
0
by: manfred | last post by:
Hello, I have this error with C# code Compiler Error CS0246: The Type or Namespace Name <XmlNavigator> Could Not be Found or Compiler Error CS0246: The Type or Namespace Name...
1
by: robseflops | last post by:
Hi! I have a Asp.net 2.0 application that uses a masterpage. It works fine on the development machine but when I move the app to a Win 2003 server thinks go wrong: When I navigate to a page that...
0
by: WebDev2 | last post by:
I can't get AJAX.NET Pro to work. I keep getting a Compiler Error Message: CS0246: The type or namespace name 'AjaxPro' could not be found (are you missing a using directive or an assembly...
4
by: infinetinc | last post by:
I'm receiving the following error when this site is published to the production environment: Compiler Error Message: CS0246: The type or namespace name 'GridViewHelper' could not be found (are you...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.