I dont know if this is possible, but i want to assign some sort of number value to a string so i can compare the strings. Im making a card game and the cards are put to a list using a deal method which contains some switches that return "TWO", THREE..."ACE"
Now i have no way of comparing these, like
"ACE" > "TWO"
Any ideas?
Loading
Jaish MathewsPosted Apr 9, 2010, 12:07 PM
using System.Collections.Specialized;
ListDictionary li = new ListDictionary();
li.Add("TWO", 2);
li.Add("THREE", 3);
li.Add("ACE", 4);
if(int.Parse(li["ACE"].ToString()) > int.Parse( li["TWO"].ToString() ))
{
}
ShanePosted Apr 9, 2010, 12:32 PM
Jaish MathewsPosted Apr 9, 2010, 12:27 PM
Please mark if your problem resolved.
ShanePosted Apr 9, 2010, 12:17 PM