We help IT Professionals succeed at work.

Change Solution and related projects Namespace.

adktd
adktd used Ask the Experts™
on
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.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
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