Click here to Skip to main content
15,890,579 members
Home / Discussions / C#
   

C#

 
GeneralRe: system.drawing.image condition Pin
Xavier Escalante31-Aug-18 6:13
Xavier Escalante31-Aug-18 6:13 
QuestionDetect Router IP Address Change Pin
Kevin Marois28-Aug-18 7:25
professionalKevin Marois28-Aug-18 7:25 
AnswerRe: Detect Router IP Address Change Pin
Dave Kreskowiak28-Aug-18 7:40
mveDave Kreskowiak28-Aug-18 7:40 
GeneralRe: Detect Router IP Address Change Pin
Kevin Marois28-Aug-18 8:24
professionalKevin Marois28-Aug-18 8:24 
AnswerRe: Detect Router IP Address Change Pin
OriginalGriff28-Aug-18 8:07
mveOriginalGriff28-Aug-18 8:07 
GeneralRe: Detect Router IP Address Change Pin
Kevin Marois28-Aug-18 8:24
professionalKevin Marois28-Aug-18 8:24 
GeneralCall WebApi from MVC application and pass the value to a model class Pin
Member 1396461028-Aug-18 3:55
Member 1396461028-Aug-18 3:55 
GeneralRe: Call WebApi from MVC application and pass the value to a model class Pin
Simon_Whale28-Aug-18 4:43
Simon_Whale28-Aug-18 4:43 
QuestionHow to parse certain values from an invisible cmdline Pin
wesley994626-Aug-18 5:08
wesley994626-Aug-18 5:08 
AnswerRe: How to parse certain values from an invisible cmdline Pin
Mycroft Holmes26-Aug-18 13:14
professionalMycroft Holmes26-Aug-18 13:14 
GeneralRe: How to parse certain values from an invisible cmdline Pin
wesley994626-Aug-18 13:37
wesley994626-Aug-18 13:37 
AnswerRe: How to parse certain values from an invisible cmdline Pin
OriginalGriff26-Aug-18 21:25
mveOriginalGriff26-Aug-18 21:25 
AnswerRe: How to parse certain values from an invisible cmdline Pin
Matias Lopez31-Aug-18 8:54
Matias Lopez31-Aug-18 8:54 
QuestionC# float variable are losing their decimals after being inserted on MySQL database Pin
Member 1394865826-Aug-18 2:18
Member 1394865826-Aug-18 2:18 
QuestionRe: C# float variable are losing their decimals after being inserted on MySQL database Pin
Richard MacCutchan26-Aug-18 2:56
mveRichard MacCutchan26-Aug-18 2:56 
AnswerRe: C# float variable are losing their decimals after being inserted on MySQL database Pin
OriginalGriff26-Aug-18 4:04
mveOriginalGriff26-Aug-18 4:04 
AnswerRe: C# float variable are losing their decimals after being inserted on MySQL database Pin
Richard Andrew x6426-Aug-18 4:16
professionalRichard Andrew x6426-Aug-18 4:16 
AnswerRe: C# float variable are losing their decimals after being inserted on MySQL database Pin
MadMyche27-Aug-18 9:38
professionalMadMyche27-Aug-18 9:38 
GeneralRe: C# float variable are losing their decimals after being inserted on MySQL database Pin
Richard Andrew x642-Sep-18 5:20
professionalRichard Andrew x642-Sep-18 5:20 
QuestionHow to get all excel cell data and update new data under specific cell using c# Pin
Sammed24-Aug-18 2:36
Sammed24-Aug-18 2:36 
QuestionC# List<Task> Execution Order Pin
Kevin Marois23-Aug-18 8:22
professionalKevin Marois23-Aug-18 8:22 
AnswerRe: C# List<Task> Execution Order Pin
Richard Deeming23-Aug-18 8:37
mveRichard Deeming23-Aug-18 8:37 
As always, the answer is "it depends". Smile | :)

It will depend on the current TaskScheduler[^], which is the class that actually schedules the work.

The default TaskScheduler uses the thread pool, so it will also depend on what other things are happening in your AppDomain at the time.

But in general, you can't depend on the tasks executing in a defined order. If your code requires a specific order, then that's a bug. You need to rewrite your code to explicitly execute the tasks in the required order, or to use synchronization primitives to prevent one task from executing before a task it depends on has finished.

One simple solution would be:
C#
// These tasks will execute in parallel, with no defined order:
await Task.WhenAll(
    FirstTask(),
    SecondTask(),
    ThirdTask(),
);

// This task won't execute until the first three have all finished:
await FourthTask();

// These tasks won't execute until the fourth task has finished.
// They will execute in parallel, with no defined order.
await Task.WhenAll(
    FifthTask(),
    SixthTask(),
);




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

GeneralRe: C# List<Task> Execution Order Pin
Kevin Marois23-Aug-18 9:00
professionalKevin Marois23-Aug-18 9:00 
GeneralRe: C# List<Task> Execution Order Pin
Bernhard Hiller23-Aug-18 21:40
Bernhard Hiller23-Aug-18 21:40 
QuestionUnzip file from resources Pin
JCompier21-Aug-18 19:15
JCompier21-Aug-18 19:15 

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.