Re: Getting namespace errors on compile
- From: John B <jbngspam@xxxxxxxxx>
- Date: Wed, 31 Oct 2007 14:53:44 +1100
tshad wrote:
I have a file that I converted from VB.Net to C# that works fine in VB.Net when I compile but not in C# using the same libraries.^^^^
The error I am getting is:
PageInit.cs(9,7): error CS0138: A using namespace directive can only be applied
to namespaces; 'System.Web.HttpCookie' is a class not a namespace
The code is:
**********************************
using System;
using System.Web;
using System.IO;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.SessionState;
using System.Data;
using System.Data.SqlClient;
using System.Web.HttpCookie;
Have you tried removing the offending using directive?
Try and remove it and see if that fixes it.
<...>
JB
.
- Follow-Ups:
- Re: Getting namespace errors on compile
- From: Francois Malgreve
- Re: Getting namespace errors on compile
- References:
- Getting namespace errors on compile
- From: tshad
- Getting namespace errors on compile
- Prev by Date: Re: How to get the path then start a application by dobble cilch on pr
- Next by Date: ?? 'new' and 'protected' Modifiers on Structs ??
- Previous by thread: Getting namespace errors on compile
- Next by thread: Re: Getting namespace errors on compile
- Index(es):
Relevant Pages
|