I have a workflow with a Nullable<TimeSpan> variable "TimeRemaining". This variable is used by an If activity, the Condition of which is:
TimeRemaining.HasValue And TimeRemaining.Value.TotalMinutes < 60
Whenever the If is executed with TimeRemaining null, an exception is thrown: "Nullable object must have a value".
Is this because the And operator in VB always executes all clauses (unlike && in C#)? I'm not sure this is the case because this exception appears to be raised before the activity is executed (a breakpoint on the activity in the designer is not hit).
Is something happening internally in WF to call the Value property? Or is there a version of the And operator which doesn't hit all clauses?
View Complete Post