|
-
July 13th, 2009, 03:32 AM
#5
Re: construct array out of string
 Originally Posted by Trainwreck
So would it still be possible to construct a class, array or list (or what ever is best in this case) when i don't know the exact vars?? In PHP i could do something like this with a 2D array. Maybe this is possible in C# too??
//When the string is splitted
string s1 = myArray[0]["name"];
string s2 = myArray[0]["gear"];
string s3 = myArray[0]["location"];
your property names are the ID, rank and gear and values respectively 12, 4 and "none" so constricting a class is very simple
win7 x86, VS 2008 & 2010, C++/CLI, C#, .NET 3.5 & 4.0, VB.NET, VBA... WPF is comming
remeber to give feedback  you think my response deserves recognition? perhaps you may want to click the Rate this post link/button and add to my reputation
private lessons are not an option so please don't ask for help in private, I won't replay
if you use Opera and you'd like to have the tab-button functionality for the texteditor take a look at my Opera Tab-UserScirpt; and if you know how to stop firefox from jumping to the next control when you hit tab let me know
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|