sirbounty
asked on
Help clarifying a textbook example project
I have been studying creating custom user controls, and am about to start the "Hands-on" programming example.
However, it's as if it's introducing a new feature that wasn't explained in the text. Could someone clarify what is meant by changing the root namespace in the following:
"Create a Windows user control that ... <blah> <blah> <blah>
This control must make the data ... available to the form...
To share a Person structure between the control and the form, each project must be declared in the same namespace. By default, each project is created in its own root namespace. The easiest and best way to change this is to display the Project Properties dialog box and change the root namespace before building the project."
So - why exactly is changing the namespace necessary?
And what exactly would one change it to?
However, it's as if it's introducing a new feature that wasn't explained in the text. Could someone clarify what is meant by changing the root namespace in the following:
"Create a Windows user control that ... <blah> <blah> <blah>
This control must make the data ... available to the form...
To share a Person structure between the control and the form, each project must be declared in the same namespace. By default, each project is created in its own root namespace. The easiest and best way to change this is to display the Project Properties dialog box and change the root namespace before building the project."
So - why exactly is changing the namespace necessary?
And what exactly would one change it to?
ASKER
Hmm - maybe my ignorance stems from the usage of 'namespace'. What is it and how's it used in my project(s)?
Why would they need to share the same namespace and/or what would be the limitation(s) if they did not?
Why would they need to share the same namespace and/or what would be the limitation(s) if they did not?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanx! :^)
You can change it to whatever you want, just so long as they are the same. So, for example, you might have a line like:
Namespace MyProject.UserControlSampl
At the top of your UserControl class and the form in your test harness project.