Click here to Skip to main content
15,914,322 members
Home / Discussions / C#
   

C#

 
AnswerRe: Fetch Data from another website Pin
OriginalGriff5-May-13 22:07
mveOriginalGriff5-May-13 22:07 
AnswerRe: Fetch Data from another website Pin
Clifford Nelson6-May-13 5:38
Clifford Nelson6-May-13 5:38 
QuestionAuto Dial-Up Method not working on 64-bit machine Pin
Edward_Zhao5-May-13 14:40
professionalEdward_Zhao5-May-13 14:40 
AnswerRe: Auto Dial-Up Method not working on 64-bit machine Pin
Garth J Lancaster5-May-13 16:41
professionalGarth J Lancaster5-May-13 16:41 
GeneralRe: Auto Dial-Up Method not working on 64-bit machine Pin
Edward_Zhao8-May-13 20:10
professionalEdward_Zhao8-May-13 20:10 
Questionwebrequest/response live.mail.com Pin
Crispybc5-May-13 12:15
Crispybc5-May-13 12:15 
AnswerRe: webrequest/response live.mail.com Pin
Bernhard Hiller5-May-13 22:04
Bernhard Hiller5-May-13 22:04 
GeneralRe: webrequest/response live.mail.com Pin
Crispybc6-May-13 2:41
Crispybc6-May-13 2:41 
Questionproblem Webservice Pin
azadehrasadi5-May-13 0:12
azadehrasadi5-May-13 0:12 
AnswerRe: problem Webservice Pin
OriginalGriff5-May-13 6:08
mveOriginalGriff5-May-13 6:08 
GeneralRe: problem Webservice Pin
azadehrasadi12-May-13 2:17
azadehrasadi12-May-13 2:17 
GeneralRe: problem Webservice Pin
OriginalGriff12-May-13 2:24
mveOriginalGriff12-May-13 2:24 
GeneralRe: problem Webservice Pin
azadehrasadi12-May-13 18:31
azadehrasadi12-May-13 18:31 
QuestionWEB SERVICES Pin
sonu Ranjan4-May-13 22:16
sonu Ranjan4-May-13 22:16 
AnswerRe: WEB SERVICES Pin
Abhinav S5-May-13 20:37
Abhinav S5-May-13 20:37 
QuestionUSB device being in use Pin
Blubbo3-May-13 5:10
Blubbo3-May-13 5:10 
AnswerRe: USB device being in use Pin
Gerry Schmitz3-May-13 11:54
mveGerry Schmitz3-May-13 11:54 
GeneralRe: USB device being in use Pin
Blubbo8-May-13 8:23
Blubbo8-May-13 8:23 
GeneralRe: USB device being in use Pin
Gerry Schmitz8-May-13 11:12
mveGerry Schmitz8-May-13 11:12 
QuestionIs streamreader slow compared to other text import functions? Pin
turbosupramk33-May-13 3:42
turbosupramk33-May-13 3:42 
I'm building a vcf editor and there are approximately 4k contacts in the particular file I'm using.

I've gotten to contact 1000 in a little over 10 minutes, so I'm wondering what a faster way to go about parsing these would be?

The file is only 1.2mb and the function is below. Maybe the slow speed is in the gui update and not stream reader, not sure?


C#
using (StreamReader reader = new StreamReader(filePath))
                {
                    List<string> vcfFile = new List<string>();
                    string readLine;
                    while ((readLine = reader.ReadLine()) != null)
                    {
                        vcfFile.Add(readLine); // Add to list.
                    }
                    int count = 0;
                    foreach (string line in vcfFile)
                    {
                        if (line == "BEGIN:VCARD")
                        {
                            count = count + 1;
                            tbxOutput.Text += (count + ".) ").ToString();
                        }
                        tbxOutput.Text += line + System.Environment.NewLine;
                        if (line == "END:VCARD")
                        {
                            tbxOutput.Text += System.Environment.NewLine + System.Environment.NewLine;
                        }
                        Application.DoEvents();
                    }
                }

AnswerRe: Is streamreader slow compared to other text import functions? Pin
GuyThiebaut3-May-13 4:21
professionalGuyThiebaut3-May-13 4:21 
GeneralRe: Is streamreader slow compared to other text import functions? Pin
turbosupramk33-May-13 4:51
turbosupramk33-May-13 4:51 
AnswerRe: Is streamreader slow compared to other text import functions? Pin
Pete O'Hanlon3-May-13 4:24
mvePete O'Hanlon3-May-13 4:24 
GeneralRe: Is streamreader slow compared to other text import functions? Pin
turbosupramk33-May-13 5:13
turbosupramk33-May-13 5:13 
AnswerRe: Is streamreader slow compared to other text import functions? Pin
turbosupramk33-May-13 5:14
turbosupramk33-May-13 5:14 

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.