Solved

Change Solution and related projects Namespace.

Posted on 2006-10-20
3
229 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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
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…
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

813 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now