tagged [namespaces]

Partial class in different namespaces

Partial class in different namespaces Can I create partial class in different namespaces? Will it work correct? e.x.: class1.cs class2.cs main.cs `

31 Mar at 14:33

How to add namespaces in web.config file?

How to add namespaces in web.config file? I am using VS 2008 and C# but when I added namespace in `web.config` file, that namespace is not imported or included in `code behind or aspx` I have also rea...

C# Namespaces and Assemblies Best Practice

C# Namespaces and Assemblies Best Practice C#: are there any guidelines, best practices when it comes to dividing a solution up into namespaces and assemblies? Should namespaces normally be nested, wi...

26 Oct at 10:28

Can't find System.Windows.Media namespace?

Can't find System.Windows.Media namespace? I'm using an object from a 3rd party API that has a property of type `System.Windows.Media.ImageSource`, yet I can't seem to find the System.Windows.Media na...

13 Apr at 18:11

C# Namespace Alias qualifier (::) vs Dereferencing Operator (.)

C# Namespace Alias qualifier (::) vs Dereferencing Operator (.) Quick and simple question. I kind of understand what the Namespace Alias qualifier does, it's for accessing members in a namespace, howe...

28 Aug at 06:39

How do you properly use namespaces in C++?

How do you properly use namespaces in C++? I come from a Java background, where packages are used, not namespaces. I'm used to putting classes that work together to form a complete object into package...

23 May at 10:11

How do you structure your reusable libraries?

How do you structure your reusable libraries? How do you organize your code so that it can easily be ported across business projects without carrying unnecessary bloat? For example (in .Net), let's sa...

Is there a way to escape root namespace in VB?

Is there a way to escape root namespace in VB? How do I do this in VB, while having a root namespace in the application, is this possible?

System.ServiceModel missing

System.ServiceModel missing I'm working with VS2010 express on Win7 (64 bit) and I'm trying use `System.ServiceModel` but I get an error that there is no `ServiceModel` in the `System` namespace: > Th...

22 Feb at 12:33

Namespace and Sub Namespaces

Namespace and Sub Namespaces Is there a way to use a namespace and then have it automatically use all sub namespaces? Example: In order for me to use the code in Root.Account, I would need to add usin...

27 Jul at 13:3

XML-documentation for a namespace

XML-documentation for a namespace Would you write xml-doc for a namespace? And if yes, how and where? I would think, if it is possible, maybe an almost empty file like this: But will that work? Since ...

1 May at 19:20

How to specify an xmlns for XDocument?

How to specify an xmlns for XDocument? I tried: But I get: I also tried substituting (accor

12 Feb at 20:14

Methods inside namespace c#

Methods inside namespace c# Is there any way to call a function that is inside of a namespace without declaring the class inside c#. For Example, if I had 2 methods that are the exact same and should ...

13 May at 00:9

Namespace conflict in C#

Namespace conflict in C# There is a `System` namespace inside my program's namespace. And as a result I can't see the standard `System` namespace from within mine. How can I resolve this problem? ![en...

26 Jan at 14:37

System.drawing namespace not found under console application

System.drawing namespace not found under console application I selected console application as my C# project. But the imports that seemed to work under Windows Form project don't seem to work here. It...

Could not find 'WindowsFormsApplication1.Program' specified for Main method after renaming name space

Could not find 'WindowsFormsApplication1.Program' specified for Main method after renaming name space I have a C# app that had the default namespace `WindowsFormsApplication1`. I decided that I would ...

28 Jun at 04:22

how i can list out all the namespace in XML?

how i can list out all the namespace in XML? My basic requirement is to get element value from the XML file, i have used XMLDoxument.SelectSingleNode. My XML file contains some Namespace in header, so...

20 Feb at 20:0

How to deserialize xml when root declare namespaces?

How to deserialize xml when root declare namespaces? I have xml: I want to deserialize it to object, for example: Wh

Error: The type or namespace name 'ApplicationUser' could not be found in Visual Studio 2013

Error: The type or namespace name 'ApplicationUser' could not be found in Visual Studio 2013 I am following the "RESTful WCF Service" tutorial. But when I built my application I get this error: > The ...

9 Dec at 10:12

XPath doesn't work as desired in C#

XPath doesn't work as desired in C# My code doesn't return the node I'm pretty sure my XML and Xpath are correct. My Xpath : `/ItemLookupResponse/OperationRequest/RequestId` My XML : ```

6 Feb at 17:20

explicitly refer to a class without a namespace in C#

explicitly refer to a class without a namespace in C# The code I'm working with has a class called that is not in any namespace. Unfortunately if I am in a class that imports the namespace, there is n...

4 May at 18:41

Unnamed/anonymous namespaces vs. static functions

Unnamed/anonymous namespaces vs. static functions A feature of C++ is the ability to create unnamed (anonymous) namespaces, like so: You would think that such a feature would be useless -- since you c...

6 Dec at 18:57

XElement namespaces (How to?)

XElement namespaces (How to?) How to create xml document with node prefix like: When I try to run something like `new XElement("sphinx:docset")` i getting exception > Unhandled Exception: System.Xml.X...

8 May at 09:37

C# error when class shares name with namespace

C# error when class shares name with namespace I discovered today that the above gives error `Type name expected but namespace name found`. I find this surprising. As far as I'm aware, you can't decla...

How can I retrieve the namespace to a string C#

How can I retrieve the namespace to a string C# I am writing a program which needs the namespace of the program but I cant seem to figure out how to retrieve it. I would like the end result to be in a...

28 Aug at 10:32