Jump to content


Check out our Community Blogs

Register and join over 40,000 other developers!


Recent Status Updates

View All Updates

Photo
- - - - -

Multiple Namespaces Help?

namespace

  • Please log in to reply
3 replies to this topic

#1 tavichh

tavichh

    CC Addict

  • Senior Member
  • PipPipPipPipPip
  • 399 posts
  • Location:Delaware
  • Programming Language:C#
  • Learning:C++, PHP, JavaScript

Posted 06 May 2012 - 10:24 AM

I am doing yet another little project with a few of my friends. In the the dll file for the project I have some namespaces.
namespace adkcd
{
	namespace Props
	{
	}
}
	namespace World
	{
	}
}
	namespace Player
	{
	}
}

They look like that. ;P
When I type adkcd.World nothing comes up but when I type adkcd.Props that works. Why? I am also getting a bracket error but it looks like all of the brackets are in the right place?
  • 0
Send a like my way if I helped you or if you found my post useful or even just enjoyed reading my post.
Thank you :)

#2 Tonchi

Tonchi

    Helping the world with programming

  • Expert Member
  • PipPipPipPipPipPipPip
  • 1249 posts
  • Location:Zagreb
  • Programming Language:C#, Others
  • Learning:C, C++, Python, JavaScript, Transact-SQL, Assembly

Posted 06 May 2012 - 12:35 PM

because World is not in adkcd scope...you have closed paranthesis of adkcd after Props...try like this:

namespace adkcd
{
		namespace Props
		{
		}
		namespace World
		{
		}
		namespace Player
		{
		}
}

also you should get compiler error because there is 4 '{' and there is also 6 '}'...there should be } for each {
  • 0

Microsoft Student Partner, Microsoft Certified Professional


#3 tavichh

tavichh

    CC Addict

  • Senior Member
  • PipPipPipPipPip
  • 399 posts
  • Location:Delaware
  • Programming Language:C#
  • Learning:C++, PHP, JavaScript

Posted 06 May 2012 - 01:29 PM

Thank you very much!
  • 0
Send a like my way if I helped you or if you found my post useful or even just enjoyed reading my post.
Thank you :)

#4 Tonchi

Tonchi

    Helping the world with programming

  • Expert Member
  • PipPipPipPipPipPipPip
  • 1249 posts
  • Location:Zagreb
  • Programming Language:C#, Others
  • Learning:C, C++, Python, JavaScript, Transact-SQL, Assembly

Posted 06 May 2012 - 01:31 PM

no problem...i'm here to help...just don't forget principal rules of C#
  • 0

Microsoft Student Partner, Microsoft Certified Professional






Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download