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

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • =?Utf-8?B?Q2FsaWNvIFR1ZGU=?=

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

    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.c s). 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.
  • Jon Skeet [C# MVP]

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

    Calico Tude <CalicoTude@dis cussions.micros oft.comwrote:
    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.c s). 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.

    --
    Jon Skeet - <skeet@pobox.co m>
    http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
    World class .NET training in the UK: http://iterativetraining.co.uk

    Comment

    Working...