I understand that IsFaulted is a property that can only be used with Get and what it is used for, but I had trouble understanding when and when it was ever changed from true to false. Most of the sites that I see on the Internet discuss what it is used for and maybe check it out, but I don’t see them ever changing it intentionally or through some kind of work.
I assume that you are talking about Task.IsFaulted.
Task.IsFaulted
It changes to trueif during execution of tasks there is an exception without participation. Its condition depends on the internal flags set inside.
true
IsFaulted , :
IsFaulted
public bool IsFaulted { get { // Faulted is "king" -- if that bit is present (regardless of other bits), we are faulted. return ((m_stateFlags & TASK_STATE_FAULTED) != 0); } }
, . - ( , ), ContinueWith Task. , IsFaulted.
ContinueWith
Task
, , , . , , Task, , . , , .
, - , , , , , . ContinueWith. , , , , , , . Task, , , .