Click here to Skip to main content
15,898,957 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Regarding long data type .. Pin
Luc Pattyn6-Sep-10 3:19
sitebuilderLuc Pattyn6-Sep-10 3:19 
GeneralRe: Regarding long data type .. Pin
Dave Kreskowiak6-Sep-10 3:49
mveDave Kreskowiak6-Sep-10 3:49 
QuestionRead Table of Content from PDF using PDFBOX library Pin
Nilesh Araligidad3-Sep-10 3:57
Nilesh Araligidad3-Sep-10 3:57 
AnswerIgnore - Crosspost Pin
Dave Kreskowiak3-Sep-10 4:55
mveDave Kreskowiak3-Sep-10 4:55 
QuestionProblem in UDP socket connection. [modified] Pin
jainiraj3-Sep-10 1:39
jainiraj3-Sep-10 1:39 
AnswerRe: Problem in UDP socket connection. Pin
Dave Kreskowiak3-Sep-10 2:14
mveDave Kreskowiak3-Sep-10 2:14 
GeneralMessage Removed Pin
3-Sep-10 2:53
jainiraj3-Sep-10 2:53 
GeneralRe: Problem in UDP socket connection. Pin
LloydA1114-Sep-10 3:40
LloydA1114-Sep-10 3:40 
GeneralRe: Problem in UDP socket connection. Pin
Expert Coming4-Sep-10 22:29
Expert Coming4-Sep-10 22:29 
GeneralRe: Problem in UDP socket connection. Pin
LloydA1115-Sep-10 2:58
LloydA1115-Sep-10 2:58 
GeneralRe: Problem in UDP socket connection. Pin
Dave Kreskowiak5-Sep-10 3:07
mveDave Kreskowiak5-Sep-10 3:07 
GeneralRe: Problem in UDP socket connection. Pin
LloydA1115-Sep-10 3:08
LloydA1115-Sep-10 3:08 
GeneralMessage Removed Pin
27-Oct-10 8:33
flflshop27-Oct-10 8:33 
GeneralRe: Problem in UDP socket connection. Pin
LloydA11127-Oct-10 8:39
LloydA11127-Oct-10 8:39 
QuestionHow to tell the difference of Null value or true or false for Yes/No field in access database from vb.net Pin
Andraw Tang1-Sep-10 11:28
Andraw Tang1-Sep-10 11:28 
AnswerRe: How to tell the difference of Null value or true or false for Yes/No field in access database from vb.net Pin
Luc Pattyn1-Sep-10 12:54
sitebuilderLuc Pattyn1-Sep-10 12:54 
GeneralRe: How to tell the difference of Null value or true or false for Yes/No field in access database from vb.net Pin
Andraw Tang1-Sep-10 13:01
Andraw Tang1-Sep-10 13:01 
GeneralRe: How to tell the difference of Null value or true or false for Yes/No field in access database from vb.net Pin
Andraw Tang1-Sep-10 13:02
Andraw Tang1-Sep-10 13:02 
GeneralRe: How to tell the difference of Null value or true or false for Yes/No field in access database from vb.net Pin
Luc Pattyn1-Sep-10 13:40
sitebuilderLuc Pattyn1-Sep-10 13:40 
QuestionTrying to Understand .NET 4 Parallelization Pin
Dominick Marciano1-Sep-10 6:41
professionalDominick Marciano1-Sep-10 6:41 
In my program there is a function that loops through a list of files, opens each file, reads the contents, and then needs to output an excel file that contains the data plus additional notes that is determines from the data. The loop is something like this (overly simplified though)

Private Function ProcessFiles()

Dim FilesToProcess as List(Of String)

PopulateList(FilesToProcess)

For Each item As String in FilesToProcess

Dim fs As New FileStream(item)
Dim Data As String = fs.ReadToEnd

...
...
...

Next

End Function


In my program this is probably the function that takes the longest to complete and I feel that it might benefit from parallelization and would like to run some benchmarks. However I'm having trouble understanding how to implement the parallelization.

From what I've gathered so far I might be able to do something like this:

Private Function ProcessFiles()

Dim FilesToProcess as List(Of String)

PopulateList(FilesToProcess)

Parallel.ForEach(FilesToProcess ???)

Dim fs As New FileStream(item)
Dim Data As String = fs.ReadToEnd

...
...
...

Next

End Function


Not sure how to write the rest of the Parallel.ForEach. Any help would be greatly appreciated. Thanks in advance.
AnswerRe: Trying to Understand .NET 4 Parallelization Pin
Dave Kreskowiak1-Sep-10 7:34
mveDave Kreskowiak1-Sep-10 7:34 
GeneralRe: Trying to Understand .NET 4 Parallelization Pin
Dominick Marciano1-Sep-10 8:07
professionalDominick Marciano1-Sep-10 8:07 
AnswerRe: Trying to Understand .NET 4 Parallelization Pin
Luc Pattyn1-Sep-10 8:40
sitebuilderLuc Pattyn1-Sep-10 8:40 
GeneralRe: Trying to Understand .NET 4 Parallelization Pin
Dominick Marciano1-Sep-10 13:41
professionalDominick Marciano1-Sep-10 13:41 
GeneralRe: Trying to Understand .NET 4 Parallelization Pin
phil.o2-Sep-10 2:16
professionalphil.o2-Sep-10 2:16 

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.