Skip to content

Commit 81e979c

Browse files
authored
Update Invalid TransactionType Logic (#46472)
Example snippet returns an Invalid parse per row as follows: "Deposit => Parsed Amount: 10000, New Balance: 10000 Invalid => Parsed Amount: 0, New Balance: 10000 Deposit => Parsed Amount: 500, New Balance: 10500 Invalid => Parsed Amount: 0, New Balance: 10500"
1 parent b6833f1 commit 81e979c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

docs/csharp/tour-of-csharp/tutorials/snippets/PatternMatching/FirstEnumExample.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,9 @@ public static void Main()
5858
else if (transactionType?.ToUpper() is "WITHDRAWAL")
5959
yield return (TransactionType.Withdrawal, amount);
6060
}
61+
else {
6162
yield return (TransactionType.Invalid, 0.0);
63+
}
6264
}
6365
}
6466
}

0 commit comments

Comments
 (0)