Yong

Yong

  • NA
  • 1
  • 0

C# namespaces

Jun 12 2009 5:22 AM
Hi guys, I'm relatively new to programming and particularly visual c#. I have a two-part question with regards to namespaces. The only way I can describe this is what appears to be namespace members within another namespace. For instance when I create a new application the generic starting code has the following declarations:

using System;
using System.Windows.Forms; etc.

What I would like to know is are both declarations necessary? If there is a namespace within another namespace must I declare the 'sub'(forgive my lack of semantic understanding) namespace in order to gain that functionality, or is that merely for convenience?

Following on from that if both System and Forms contained a class called Application would there be a conflict or uncertainty if the namespaces were declared as above and I attempted to access  Application?

I would be most appreciative of any help on this front. Thanks!



Answers (2)