6
Reply

Can I parse an int out of the first character of a string?

Todd Vance

Todd Vance

May 31 2007 3:46 PM
2k

Ok -- been trying to make a Deck of cards class that I can use in several small applications that I am trying to write (for experience and to highlight my ability to code -- because I WANT a job in C# but CANT because I dont have any experience, but cant GET experience because I dont have a JOB which is what I am trying to get in the first PLACE!!!! - breath - ....sorry, went a little off the rez. there for a sec).

Anyway - I have decided to use the naming convention for the cards as such :  2_Spades.gif, 3_Spades.gif, etc. etc.  With the forethought that someday I could get those intial values and use them for comparison purposes when I decide to make some sort of game.

So how do I parse out that first character and cast it into an integer so that I can determine which card is higher?


Answers (6)