p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   C# 2008 aka C# 3.0 (http://p2p.wrox.com/forumdisplay.php?f=354)
-   -   error CS0234: The type or namespace name 'Xml' does not exist in the namespace 'Syste (http://p2p.wrox.com/showthread.php?t=75296)

shailesh_kumar July 16th, 2009 08:43 PM

error CS0234: The type or namespace name 'Xml' does not exist in the namespace 'Syste
 
Hi
I'm in the phase of learning C#. I'm trying to save/retrieve the data in XML file entered on command line by the user. I'm getting the following error during compilation.

error CS0234: The type or namespace name 'Xml' does not exist in the namespace 'System' (are you missing an assembly reference?)

I would appreciate, If you could help me resolve this issue.

Thanks....[:)]

Lee Dumond July 16th, 2009 09:55 PM

Do you have a reference to System.Xml in the project?

shailesh_kumar July 17th, 2009 12:29 PM

yes, I do have a reference to System.Xml in the project.
In fact, I've added the following references for XML parsing of data

using System.Xml;
using System.Xml.Serialization;

Thanks for your response Lee !

samjudson July 17th, 2009 12:32 PM

That is not the same as adding a project reference.

Is System.Xml listed under the project references.

If not, right click on the project, choose Add Reference, and add a reference to System.Xml.dll.

Lee Dumond July 17th, 2009 01:25 PM

Sam is correct. A using statement is not the same as having an assembly reference in the project.

The error message tells you exactly what to do:

are you missing an assembly reference?

That means you need to reference the assembly.

shailesh_kumar July 17th, 2009 02:13 PM

Thanks a lot Sam, Lee ! That helped.

Appreciate It..

shailesh_kumar August 19th, 2009 07:56 PM

Overwrite the User Input in XML file
 
Hi
I'm learning to code in C#. I'm writing the code which gets the UserInput from Command line and saves it in the XML file. I'm using XML serialization and Deserialization to get the User input(for e.g. BankAccountNumber,Type,Balance) in XML file. My code overwrites the last user input and doesn't add/increment the last user input as next entry. I guess, I'm missing some enhancement in my code to save/increment each user input in XML file. I would appreciate, If someone could help me to resolve this issue.

Thanks for Your Help !

Regards

gbianchi August 19th, 2009 08:28 PM

Hi.. Seeing some code will help us help you.

samjudson August 20th, 2009 03:11 AM

Not posting on the end of an unrelated question would also help.


All times are GMT -4. The time now is 10:16 AM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.