Solved

Change Solution and related projects Namespace.

Posted on 2006-10-20
3
230 Views
Last Modified: 2008-02-01
Hi you experts.
I have developed a web application that has a few projects including a web site.
Can i change the Namespace of the solution and of all related projects?


Thank you all in advance.
0
Comment
Question by:adktd
3 Comments
 
LVL 20

Accepted Solution

by:
REA_ANDREW earned 20 total points
ID: 17772950
As long as after changing these, everything has the correct references. For Example

say you have a class with NameSpace CodeOne

namespace CodeOne
{
    /// <summary>
    /// Summary description for Class1
    /// </summary>
    public class Class1
    {
        public void TestIt()
        {

        }
    }
}

    protected void Page_Load(object sender, EventArgs e)
    {
        CodeOne.Class1 BB = new CodeOne.Class1();
        BB.TestIt();
    }


If I change the namepsace of the class to CodeTwo then I need to reflect this in my code behind file like so

    protected void Page_Load(object sender, EventArgs e)
    {
        CodeTwo.Class1 BB = new CodeOne.Class1();
        BB.TestIt();
    }

Otherwise you lose your reference

:-)

Andrew
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

One of the pain points with developing AJAX, JavaScript, JQuery, and other client-side behaviors is that JavaScript doesn’t allow for cross domain request for pulling content. For example, JavaScript code on www.johnchapman.name could not pull conte…
In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question