 |
| C# 2008 aka C# 3.0 Discuss the Visual C# 2008 (aka C# 3.0) language |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the C# 2008 aka C# 3.0 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

July 16th, 2009, 08:43 PM
|
|
Authorized User
|
|
Join Date: Feb 2007
Posts: 12
Thanks: 1
Thanked 0 Times in 0 Posts
|
|
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....
|
|

July 16th, 2009, 09:55 PM
|
 |
Wrox Author
|
|
Join Date: Jan 2008
Posts: 923
Thanks: 12
Thanked 166 Times in 162 Posts
|
|
Do you have a reference to System.Xml in the project?
|
|

July 17th, 2009, 12:29 PM
|
|
Authorized User
|
|
Join Date: Feb 2007
Posts: 12
Thanks: 1
Thanked 0 Times in 0 Posts
|
|
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 !
|
|

July 17th, 2009, 12:32 PM
|
 |
Friend of Wrox
|
|
Join Date: Aug 2007
Posts: 2,128
Thanks: 1
Thanked 189 Times in 188 Posts
|
|
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.
|
|
The Following User Says Thank You to samjudson For This Useful Post:
|
|
|

July 17th, 2009, 01:25 PM
|
 |
Wrox Author
|
|
Join Date: Jan 2008
Posts: 923
Thanks: 12
Thanked 166 Times in 162 Posts
|
|
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.
|
|

July 17th, 2009, 02:13 PM
|
|
Authorized User
|
|
Join Date: Feb 2007
Posts: 12
Thanks: 1
Thanked 0 Times in 0 Posts
|
|
Thanks a lot Sam, Lee ! That helped.
Appreciate It..
|
|

August 19th, 2009, 07:56 PM
|
|
Authorized User
|
|
Join Date: Feb 2007
Posts: 12
Thanks: 1
Thanked 0 Times in 0 Posts
|
|
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
|
|

August 19th, 2009, 08:28 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
|
|
Hi.. Seeing some code will help us help you.
__________________
HTH
Gonzalo
================================================== =========
Read this if you want to know how to get a correct reply for your question.
(Took that from Doug signature and he Took that from Peter profile)
================================================== =========
My programs achieved a new certification :
WORKS ON MY MACHINE
================================================== =========
I know that CVS was evil, and now i got the proof.
================================================== =========
|
|

August 20th, 2009, 03:11 AM
|
 |
Friend of Wrox
|
|
Join Date: Aug 2007
Posts: 2,128
Thanks: 1
Thanked 189 Times in 188 Posts
|
|
Not posting on the end of an unrelated question would also help.
|
|
 |