I'm createing a program which needs saving data about for example version numbers. I will use an XML file to do so. The problem is that I'm rather new to C# Programming and I need some help with how to read an element from the XML file, read an element from another and then compare the number between the version elements. The program will then give one of the following messages:
"Application is up to date"
"There's a new version available for download"
Is this your Windows application ? trying to check updated from the internet ?
If its a windows app, i would suggest reading your application details from the Assembly.cs or from Property Settings.
You can create a key in Settings and store your info in it. Later you can get the update details from the net and compare it. This is just the suggestion...
And for what you are looking for........ Look in the attachment..
Last edited by MMH; August 12th, 2008 at 04:53 AM.
Thank you! That's just what I wanted! I will use the code in my project. I thought I had thought I had got a good idea on how to do, but it seems it doesn't work now. Thank you again!
I have some problems. My program must check the XML from the web, but that doesn't work! When I'm running the program it works fine. But then when I press the Check for Updates button, the Compiler gives me the error "The reported Search Path Format is not supported!" What to do?
I have some problems. My program must check the XML from the web, but that doesn't work! When I'm running the program it works fine. But then when I press the Check for Updates button, the Compiler gives me the error "The reported Search Path Format is not supported!" What to do?
I dont know why the compiler is giving you the error.
I have tried the same thing by changing source of the xml.
Try this below code. just replace the existing code with the below and see if it works for you.
I know that I'm probably annoying and this migt not be the right place to tell (in a thread about READING Xml), but when we're at it, what about writing Xml files?
And, Is it possible to compare letter strings?
Thank you for the source! It helped me even more!
Last edited by Guitarcomet; August 13th, 2008 at 06:40 AM.
I know that I'm probably annoying and this migt not be the right place to tell (in a thread about READING Xml), but when we're at it, what about writing Xml files?
Reading and writing XML depends on your approach. How do you read it or write it. If you want to read/write data from/to xml, then i will suggest you use XML serialization. This will allow you to load/save Object value.
Originally Posted by Guitarcomet
And, Is it possible to compare letter strings?
What comparision you want to make? What do you mean by Letter strings ?
Well, I found out that it worked to compare letter strings (or character strings). Like to compare "myname" with another character string. If they are the same the application will return true. But i found out how. Like this:
if (tbName.text == lblName.Text)
MessageBox.Show("Correct name!");
else
MessageBox.Show("Wrong name!");
So now I have no more questions! Thank you for all you've helped me with!
* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.