Click here to Skip to main content
15,905,782 members
Home / Discussions / C#
   

C#

 
GeneralRe: C# features Pin
jschell27-May-23 9:29
jschell27-May-23 9:29 
GeneralRe: C# features Pin
Gerry Schmitz27-May-23 13:28
mveGerry Schmitz27-May-23 13:28 
GeneralRe: C# features Pin
jschell29-May-23 6:02
jschell29-May-23 6:02 
GeneralRe: C# features Pin
Calin Negru28-May-23 4:16
Calin Negru28-May-23 4:16 
GeneralRe: C# features Pin
Gerry Schmitz28-May-23 4:52
mveGerry Schmitz28-May-23 4:52 
GeneralRe: C# features Pin
Calin Negru29-May-23 2:39
Calin Negru29-May-23 2:39 
GeneralRe: C# features Pin
PIEBALDconsult26-May-23 4:57
mvePIEBALDconsult26-May-23 4:57 
GeneralRe: C# features Pin
OriginalGriff26-May-23 11:36
mveOriginalGriff26-May-23 11:36 
GeneralRe: C# features Pin
PIEBALDconsult26-May-23 11:42
mvePIEBALDconsult26-May-23 11:42 
AnswerRe: C# features Pin
Richard MacCutchan26-May-23 1:04
mveRichard MacCutchan26-May-23 1:04 
GeneralRe: C# features Pin
Calin Negru26-May-23 21:37
Calin Negru26-May-23 21:37 
AnswerRe: C# features Pin
BillWoodruff26-May-23 19:42
professionalBillWoodruff26-May-23 19:42 
GeneralRe: C# features Pin
Calin Negru29-May-23 6:05
Calin Negru29-May-23 6:05 
QuestionGoogle API Authentication in a WPF App Pin
Kevin Marois22-May-23 14:04
professionalKevin Marois22-May-23 14:04 
AnswerRe: Google API Authentication in a WPF App Pin
Dave Kreskowiak22-May-23 18:54
mveDave Kreskowiak22-May-23 18:54 
QuestionConcurrentList<T> Pin
Richard Andrew x6421-May-23 8:40
professionalRichard Andrew x6421-May-23 8:40 
AnswerRe: ConcurrentList<T> Pin
Gerry Schmitz21-May-23 8:50
mveGerry Schmitz21-May-23 8:50 
GeneralRe: ConcurrentList<T> Pin
Richard Andrew x6421-May-23 10:32
professionalRichard Andrew x6421-May-23 10:32 
GeneralRe: ConcurrentList<T> Pin
Gerry Schmitz22-May-23 12:01
mveGerry Schmitz22-May-23 12:01 
GeneralRe: ConcurrentList<T> Pin
BillWoodruff22-May-23 11:38
professionalBillWoodruff22-May-23 11:38 
GeneralRe: ConcurrentList<T> Pin
Gerry Schmitz22-May-23 12:06
mveGerry Schmitz22-May-23 12:06 
AnswerRe: ConcurrentList<T> Pin
Richard Deeming21-May-23 21:05
mveRichard Deeming21-May-23 21:05 
Well, there's this internal class from the .NET Framework source:
ThreadSafeList - Reference Source[^]

But the obvious question is, what's the expected use-case? The Concurrent collections are typically designed to be as lock-free as possible. Appending an item to a list from multiple threads doesn't lend itself to that approach. And if two threads append an item at the same time, what order do you expect them to appear in?

Perhaps you're looking for something more like a producer-consumer pattern[^]? Or perhaps a ConcurrentQueue[^]?



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

GeneralRe: ConcurrentList<T> Pin
Richard Andrew x6422-May-23 6:28
professionalRichard Andrew x6422-May-23 6:28 
GeneralRe: ConcurrentList<T> Pin
Richard Deeming22-May-23 20:40
mveRichard Deeming22-May-23 20:40 
AnswerRe: ConcurrentList<T> Pin
jschell22-May-23 7:11
jschell22-May-23 7:11 

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.