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?
Loading

Todd VancePosted Jun 1, 2007, 10:01 AM
Jan MontanoPosted May 31, 2007, 11:02 PM
Mike GoldPosted May 31, 2007, 10:47 PM
Hi Todd,
It's always a little difficult getting past the catch-22,
Them: "We have .NET jobs, but we want someone with experience."
You: "How can I get experience if you don't give me a job?"
My suggestion here is to pursue a jr. level job where you may not get paid a lot, but you'll pick up the experience you'll need to get the next job. There are ways to improve your odds:
1. Get a certification in C# (MSCE)
2. Work as an intern so that you can get 6 mo. on the job.
3. If you are willing to relocate this will greatly increase your
chances.
4. Be open to a job that involves testing where you could work on
the programming end.
5. Often a college will have programming projects which you can use as experience on your resume.
6. Networking is always a great way to land a job. The truth is that many jobs are gotten just because you hit it off with the people in the company.
7. Absolutely post your resume on monster.com with C# and .NET as keywords. Put your objective as:
Seeking Junior Level job in C# and .NET in order to work with Microsoft Technology.
In the meantime, send your resume to [email protected] and we'll circulate you in our system.
Jan MontanoPosted May 31, 2007, 9:27 PM
int valueOfCard = Convert.ToInt32(numberString);
If you browse through string.Split...
Returns a String array containing the substrings in this instance that are delimited by elements of a specified Char array.
myCardBitmapName = "2_spades.gif"
The myCardBitmapName.Split('_') will return an array containing 2 elements.
1st element being "2"
2nd element being "spades.gif"
the [0] refers to the first element of the array.
Todd VancePosted May 31, 2007, 8:05 PM
I understand your first one starts at the first character and ends at the '_' -- is this basically saying the same thing in the second statement (only backwards??).
**Any tips on breaking into the industry would be greatly appreciated - I'm a tech with tech experience - going to school for C.I.S. ((UNFORTUNATELY there are NO B.S. degree programs in Programming, let alone .Net Programming)) - I have a Cert. of Completion (40 hours) at a Jr. College in Java Programming - have taken several programming classes (one using C#!) - and I am taking every tutorial I can and reading Jesse's "Programming in C#". I have had some nibbles, mainly headhunters, but everyone has balked at the "no experience" thing....grrr. **
Mike GoldPosted May 31, 2007, 5:59 PM
It's good you are trying to get experience in C# so you can persue a job in .NET. We need more .NET programmers out there!
To parse out the number use:
string numberString = myCardBitmapName.SubString(0, myCardBitmapName.IndexOf('_'));
int valueOfCard = Convert.ToInt32(numberString);
You can also use split:
string numberString = myCardBitmapName.Split('_')[0];
int valueOfCard = Convert.ToInt32(numberString);