CS0246 (problem with user-defined namespace), C#.NET 2.0

C

Calico Tude

I am new to C#, and created a simple Windows application in C#, just
to test the logic needed. This was a simple log-in which contained a single
namespace. Namespace included a class (in its own .cs file) containing
regular expressions to validate the format of the entries (user id and
password). The reason I put the reg. expressions code in a separate class
was this was a "dry run" for functionality needed for a more complex web
project.
I imported this regular-expressions class into my web application,
and am now trying to call its methods from the code-behind of my login form
(Default.aspx.cs). However, I get this error, even though I put the Using
...... directive for that class' file. I've been going around in circles
trying to find out the right way to use user-defined namespaces in a C#.NET
(2.0) project. Please advise, thanks in advance.
 
J

Jon Skeet [C# MVP]

Calico Tude said:
I am new to C#, and created a simple Windows application in C#, just
to test the logic needed. This was a simple log-in which contained a single
namespace. Namespace included a class (in its own .cs file) containing
regular expressions to validate the format of the entries (user id and
password). The reason I put the reg. expressions code in a separate class
was this was a "dry run" for functionality needed for a more complex web
project.
I imported this regular-expressions class into my web application,
and am now trying to call its methods from the code-behind of my login form
(Default.aspx.cs). However, I get this error, even though I put the Using
..... directive for that class' file. I've been going around in circles
trying to find out the right way to use user-defined namespaces in a C#.NET
(2.0) project. Please advise, thanks in advance.

Could you post a short but complete program which demonstrates the
problem?

See http://www.pobox.com/~skeet/csharp/complete.html for details of
what I mean by that.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top