at first is maybe practical to say that i am dutch, and so my english could be a little bit bad. :P
Hello everybody,
today i started to write a contact management application. and I use C# with the combination of XML(system.Xml) to make it work. at this moment i have a little problem with a array. the problem is that i dont know how to use the array in my script;
this is the array:
Code:
string [] Contactinfo;
Contactinfo = new string[5] {"Name", "Lastname", "City", "Postcode"};
As you can see i declared the 4 arrays and give all of them a special name, the 1st Name, 2nd Lastname ect ect.
but if i use this array like this(see code below). it turns out into a build error:
Error 1 Cannot implicitly convert type 'string' to 'int'
Code:
xmltextwriter.WriteElementString("naam", Contactinfo["Name"]);
this sounds strange to me because the array is a string and i didnt gave the array a value yet.(is it maybe possible, cause the array doesn't have a value yet so it returns in 0, so it's a int?)
Thank you for your attention.
Jelte.
PS: does somebody knows a good beginner tutorial of C# and XML?