Click here to Skip to main content
15,793,019 members
Home / Discussions / C#
   

C#

 
AnswerRe: ConcurrentList<T> Pin
Gerry Schmitz21-May-23 9:50
mveGerry Schmitz21-May-23 9:50 
GeneralRe: ConcurrentList<T> Pin
Richard Andrew x6421-May-23 11:32
professionalRichard Andrew x6421-May-23 11:32 
GeneralRe: ConcurrentList<T> Pin
Gerry Schmitz22-May-23 13:01
mveGerry Schmitz22-May-23 13:01 
GeneralRe: ConcurrentList<T> Pin
BillWoodruff22-May-23 12:38
professionalBillWoodruff22-May-23 12:38 
GeneralRe: ConcurrentList<T> Pin
Gerry Schmitz22-May-23 13:06
mveGerry Schmitz22-May-23 13:06 
AnswerRe: ConcurrentList<T> Pin
Richard Deeming21-May-23 22:05
mveRichard Deeming21-May-23 22:05 
GeneralRe: ConcurrentList<T> Pin
Richard Andrew x6422-May-23 7:28
professionalRichard Andrew x6422-May-23 7:28 
GeneralRe: ConcurrentList<T> Pin
Richard Deeming22-May-23 21:40
mveRichard Deeming22-May-23 21:40 
As Gerry said, sorting at what point?

If the list must always be sorted, then there's no option but to lock the entire list on every modification.

If you only want the list sorted after you've finished populating it, then it's better to use an unsorted concurrent collection (eg: ConcurrentBag<T>), and then sort the items when you consume them.



"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer

AnswerRe: ConcurrentList<T> Pin
jschell22-May-23 8:11
jschell22-May-23 8:11 
AnswerRe: ConcurrentList<T> Pin
lmoelleb26-May-23 3:55
lmoelleb26-May-23 3:55 
GeneralRe: ConcurrentList<T> Pin
Richard Andrew x6431-May-23 14:22
professionalRichard Andrew x6431-May-23 14:22 
QuestionOpen Browser, Wait for Callback Pin
Kevin Marois19-May-23 7:43
professionalKevin Marois19-May-23 7:43 
AnswerRe: Open Browser, Wait for Callback Pin
Dave Kreskowiak19-May-23 8:08
mveDave Kreskowiak19-May-23 8:08 
GeneralRe: Open Browser, Wait for Callback Pin
Kevin Marois19-May-23 9:12
professionalKevin Marois19-May-23 9:12 
GeneralRe: Open Browser, Wait for Callback Pin
Gerry Schmitz19-May-23 9:46
mveGerry Schmitz19-May-23 9:46 
GeneralRe: Open Browser, Wait for Callback Pin
Dave Kreskowiak19-May-23 11:51
mveDave Kreskowiak19-May-23 11:51 
GeneralRe: Open Browser, Wait for Callback Pin
Gerry Schmitz20-May-23 5:00
mveGerry Schmitz20-May-23 5:00 
GeneralRe: Open Browser, Wait for Callback Pin
Dave Kreskowiak20-May-23 5:16
mveDave Kreskowiak20-May-23 5:16 
GeneralRe: Open Browser, Wait for Callback Pin
Kevin Marois22-May-23 14:46
professionalKevin Marois22-May-23 14:46 
GeneralRe: Open Browser, Wait for Callback Pin
Dave Kreskowiak22-May-23 19:31
mveDave Kreskowiak22-May-23 19:31 
AnswerRe: Open Browser, Wait for Callback Pin
Pete O'Hanlon21-May-23 5:58
subeditorPete O'Hanlon21-May-23 5:58 
QuestionSame void between multiple forms in the same project? Pin
Member 1405587917-May-23 8:01
Member 1405587917-May-23 8:01 
AnswerRe: Same void between multiple forms in the same project? Pin
jschell17-May-23 8:29
jschell17-May-23 8:29 
AnswerRe: Same void between multiple forms in the same project? Pin
OriginalGriff17-May-23 8:54
mvaOriginalGriff17-May-23 8:54 
QuestionFunc<> Question Pin
Kevin Marois3-May-23 19:48
professionalKevin Marois3-May-23 19:48 

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.