Click here to Skip to main content
15,904,416 members
Home / Discussions / C#
   

C#

 
AnswerRe: OnPaint Event Pin
Christian Graus1-Sep-09 20:56
protectorChristian Graus1-Sep-09 20:56 
Questionconnections Pin
ihe1-Sep-09 18:56
ihe1-Sep-09 18:56 
AnswerRe: connections Pin
Christian Graus1-Sep-09 20:59
protectorChristian Graus1-Sep-09 20:59 
AnswerRe: connections Pin
Ashfield1-Sep-09 21:00
Ashfield1-Sep-09 21:00 
GeneralRe: connections Pin
ihe4-Sep-09 13:21
ihe4-Sep-09 13:21 
GeneralRe: connections Pin
Ashfield5-Sep-09 2:28
Ashfield5-Sep-09 2:28 
QuestionGroup Selection in List View Pin
vhassan1-Sep-09 18:46
vhassan1-Sep-09 18:46 
QuestionConvert xml file to word document Pin
Swetha Srinivasan1-Sep-09 18:46
Swetha Srinivasan1-Sep-09 18:46 
AnswerRe: Convert xml file to word document Pin
Tamer Oz1-Sep-09 19:59
Tamer Oz1-Sep-09 19:59 
GeneralRe: Convert xml file to word document Pin
Swetha Srinivasan1-Sep-09 20:15
Swetha Srinivasan1-Sep-09 20:15 
GeneralRe: Convert xml file to word document Pin
Tamer Oz1-Sep-09 20:27
Tamer Oz1-Sep-09 20:27 
QuestionHere is a stumper.... Pin
JollyMansArt1-Sep-09 17:58
JollyMansArt1-Sep-09 17:58 
AnswerRe: Here is a stumper.... Pin
Christian Graus1-Sep-09 18:20
protectorChristian Graus1-Sep-09 18:20 
AnswerRe: Here is a stumper.... Pin
cjb1101-Sep-09 21:55
cjb1101-Sep-09 21:55 
AnswerRe: Here is a stumper.... Pin
JollyMansArt2-Sep-09 3:51
JollyMansArt2-Sep-09 3:51 
QuestionAccess WMP Playlist without WMP Player [modified] Pin
Ian McCaul1-Sep-09 9:47
Ian McCaul1-Sep-09 9:47 
QuestionStack Question Pin
Alexander DiMauro1-Sep-09 8:56
Alexander DiMauro1-Sep-09 8:56 
AnswerRe: Stack Question Pin
harold aptroot1-Sep-09 9:11
harold aptroot1-Sep-09 9:11 
GeneralRe: Stack Question Pin
harold aptroot1-Sep-09 9:40
harold aptroot1-Sep-09 9:40 
AnswerRe: Stack Question Pin
Tony Richards1-Sep-09 9:18
Tony Richards1-Sep-09 9:18 
GeneralRe: Stack Question Pin
Alexander DiMauro1-Sep-09 9:36
Alexander DiMauro1-Sep-09 9:36 
AnswerRe: Stack Question Pin
Luc Pattyn1-Sep-09 13:50
sitebuilderLuc Pattyn1-Sep-09 13:50 
QuestionSorting strings [modified] Pin
gamer11271-Sep-09 8:29
gamer11271-Sep-09 8:29 
I'm having a problem in sorting strings. All the strings are saved in a text file. Now i retrieved the strings from the text file and transferred it into an array. I'll be using radix sort to sort the strings because I think its the most appropriate algorithm to use beside any other sorting algorithm. But first I want to convert all the strings into their corresponding ASCII codes and store all the ASCII codes into a temporary array so I can sort them in a much better way.

Now my problem is always get the FormatException during run-time. How will I solve that error? I already declared an array that's an int type but i still get that error.


using (StreamReader outputLastNames = new StreamReader("lastnames.txt"))
            {
                for (int i = 0; i < vehicleCountInt; i++)
                {
                    arrayOfLastNames[i] = outputLastNames.ReadLine();
                    convertedLastName[i] = Int32.Parse(arrayOfLastNames[i]);//this is the part that causes the error
                }
            }



important notes:
convertedLastName[i] is an int[] type
arrayOfLastNames[i] is a string[] type

modified on Tuesday, September 1, 2009 2:42 PM

AnswerRe: Sorting strings Pin
OriginalGriff1-Sep-09 8:39
mveOriginalGriff1-Sep-09 8:39 
AnswerRe: Sorting strings Pin
PIEBALDconsult1-Sep-09 8:53
mvePIEBALDconsult1-Sep-09 8:53 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.