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

C#

 
QuestionMixed mode assembly is built against version 'v2.0.50727' Pin
Le@rner2-Jun-22 0:38
MemberLe@rner2-Jun-22 0:38 
AnswerRe: Mixed mode assembly is built against version 'v2.0.50727' Pin
OriginalGriff2-Jun-22 1:43
mveOriginalGriff2-Jun-22 1:43 
GeneralRe: Mixed mode assembly is built against version 'v2.0.50727' Pin
Richard MacCutchan2-Jun-22 2:19
mveRichard MacCutchan2-Jun-22 2:19 
GeneralRe: Mixed mode assembly is built against version 'v2.0.50727' Pin
Le@rner2-Jun-22 17:10
MemberLe@rner2-Jun-22 17:10 
GeneralRe: Mixed mode assembly is built against version 'v2.0.50727' Pin
Richard Deeming5-Jun-22 21:49
mveRichard Deeming5-Jun-22 21:49 
GeneralRe: Mixed mode assembly is built against version 'v2.0.50727' Pin
Le@rner5-Jun-22 22:34
MemberLe@rner5-Jun-22 22:34 
Questionasync-await block Pin
j11codep31-May-22 16:46
Memberj11codep31-May-22 16:46 
AnswerRe: async-await block Pin
Richard Deeming31-May-22 21:44
mveRichard Deeming31-May-22 21:44 
1) Technically, the whole point of await is that it doesn't "block". It simply creates a continuation callback representing the rest of the method, and passes that to the task being awaited.

However, from a logical perspective, the rest of the method is "blocked" until the task returned from GetItemChildAsync completes. That happens when the task is awaited, so it "blocks" on the first item.

If you wanted to start all of the tasks at the same time, and then wait for them all to complete, you would use the Task.WhenAll method[^]:
C#
IEnumerable<Task> tasks = items.Select(i => GetItemChildAsync(i.Id));
await Task.WhenAll(tasks);

2) None whatsoever. The HttpClient class[^] is safe to call from multiple threads at the same time. In fact, a singleton used to be the recommended way to use this class[^]. However, the current recommendation is to use the IHttpClientFactory service[^] to create an HttpClient instance on demand.



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

QuestionAdding items to a list updates all previous items Pin
Code4Ever27-May-22 5:58
MemberCode4Ever27-May-22 5:58 
AnswerRe: Adding items to a list updates all previous items Pin
Gerry Schmitz27-May-22 6:21
mveGerry Schmitz27-May-22 6:21 
GeneralRe: Adding items to a list updates all previous items Pin
Code4Ever27-May-22 6:31
MemberCode4Ever27-May-22 6:31 
AnswerRe: Adding items to a list updates all previous items Pin
James Curran21-Jun-22 7:55
MemberJames Curran21-Jun-22 7:55 
QuestionHow do I add text via c# to an OPEN Excel Workbook? Pin
jrdnoland18-May-22 11:21
Memberjrdnoland18-May-22 11:21 
AnswerRe: How do I add text via c# to an OPEN Excel Workbook? Pin
OriginalGriff18-May-22 19:18
mveOriginalGriff18-May-22 19:18 
AnswerRe: How do I add text via c# to an OPEN Excel Workbook? Pin
Richard Deeming18-May-22 23:46
mveRichard Deeming18-May-22 23:46 
GeneralRe: How do I add text via c# to an OPEN Excel Workbook? Pin
Eddy Vluggen20-May-22 8:13
professionalEddy Vluggen20-May-22 8:13 
AnswerRe: How do I add text via c# to an OPEN Excel Workbook? Pin
RedDk20-May-22 9:54
MemberRedDk20-May-22 9:54 
JokeRe: How do I add text via c# to an OPEN Excel Workbook? Pin
Richard Andrew x6421-May-22 4:05
professionalRichard Andrew x6421-May-22 4:05 
GeneralRe: How do I add text via c# to an OPEN Excel Workbook? Pin
Richard MacCutchan21-May-22 6:07
mveRichard MacCutchan21-May-22 6:07 
GeneralRe: How do I add text via c# to an OPEN Excel Workbook? Pin
RedDk21-May-22 7:50
MemberRedDk21-May-22 7:50 
QuestionSend message to Microsoft teams group via connector Pin
sdesilets18-May-22 8:40
Membersdesilets18-May-22 8:40 
AnswerRe: Send message to Microsoft teams group via connector Pin
lmoelleb19-May-22 0:48
Memberlmoelleb19-May-22 0:48 
GeneralRe: Send message to Microsoft teams group via connector Pin
sdesilets19-May-22 4:44
Membersdesilets19-May-22 4:44 
QuestionAnyone have experience porting Wonderware scripting to C#.net? Pin
Bruce Armstrong 202218-May-22 6:36
MemberBruce Armstrong 202218-May-22 6:36 
AnswerRe: Anyone have experience porting Wonderware scripting to C#.net? Pin
Eddy Vluggen20-May-22 4:11
professionalEddy Vluggen20-May-22 4: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.