473,407 Members | 2,306 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,407 software developers and data experts.

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.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.
Jun 27 '08 #1
1 1749
Calico Tude <Ca********@discussions.microsoft.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.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.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
World class .NET training in the UK: http://iterativetraining.co.uk
Jun 27 '08 #2

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

Similar topics

1
by: Howard | last post by:
Hi, I am using a very simple xslt file to get info from an xml document. The problem seems to me to be that the xml doc uses a namespace, and I don't know how to set up my xslt to recognize it...
6
by: Fredrik Nelson | last post by:
Hi, I have used xsl to transform xml from sqlserver in and it works fine now i have a webservice that uses a dataset to get the data and return it as xml like the code below <WebMethod()> _...
2
by: MAF | last post by:
I am triing to query the following xml document. I am loading the xml into a XML Document and then using XPath to get the EntityDataSet Node Here is my code XMLDoc = new...
4
by: SnakeS | last post by:
When I do: using ROOT.CIMV2.Win32; the class there isn't. This namespace or class I didn't find it. How i using this classes?
5
by: Xarky | last post by:
Hi, I have the following in the project, with the following desgin. // class 1, which is a windows form namespace Name { public class aaaa {
0
by: Apollo0130 via DotNetMonster.com | last post by:
hi @ all... i have created two user controls (header.ascx and footer.ascx) with the code-behind pages. it looks like this: Control 1: --------------------------- Namespace Test Public Class...
3
by: Massimo Gentilini | last post by:
I have a problem with namespace: I've a class in a namespace namespace.Foo that's used in a web method when I reference the web method from a web service the namespace changes because of...
0
by: Adi | last post by:
hi everyone.. i am working on a web application in VS 2005.. i recently converted my application from VS2003 to VS2005.. after the conversion.. when i compiled the application i was starting to get...
0
by: fragmonster | last post by:
Hi, I have a .NET Web Service. I must write a client in PHP5. I've got a problem with the formatting of my SoapHeader. In fact, the prefix of the namespace does not apply to the entire header...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.