diff --git a/dotnet/samples/03-workflows/ConditionalEdges/03_MultiSelection/Program.cs b/dotnet/samples/03-workflows/ConditionalEdges/03_MultiSelection/Program.cs index 6eac1cbcd9..d0b1a2a673 100644 --- a/dotnet/samples/03-workflows/ConditionalEdges/03_MultiSelection/Program.cs +++ b/dotnet/samples/03-workflows/ConditionalEdges/03_MultiSelection/Program.cs @@ -93,13 +93,11 @@ public static class Program { Console.WriteLine($"{outputEvent}"); } - - if (evt is DatabaseEvent databaseEvent) + else if (evt is DatabaseEvent databaseEvent) { Console.WriteLine($"{databaseEvent}"); } - - if (evt is WorkflowErrorEvent workflowError) + else if (evt is WorkflowErrorEvent workflowError) { Console.ForegroundColor = ConsoleColor.Red; Console.Error.WriteLine(workflowError.Exception?.ToString() ?? "Unknown workflow error occurred."); diff --git a/dotnet/samples/03-workflows/HumanInTheLoop/HumanInTheLoopBasic/Program.cs b/dotnet/samples/03-workflows/HumanInTheLoop/HumanInTheLoopBasic/Program.cs index 30a53c771f..b1ba52bdf0 100644 --- a/dotnet/samples/03-workflows/HumanInTheLoop/HumanInTheLoopBasic/Program.cs +++ b/dotnet/samples/03-workflows/HumanInTheLoop/HumanInTheLoopBasic/Program.cs @@ -53,7 +53,7 @@ public static class Program Console.ForegroundColor = ConsoleColor.Red; Console.Error.WriteLine($"Executor '{executorFailed.ExecutorId}' failed with {(executorFailed.Data == null ? "unknown error" : $"exception {executorFailed.Data}")}."); Console.ResetColor(); - break; + return; } } }