mirror of
https://github.com/markjprice/cs11dotnet7.git
synced 2026-04-06 06:43:47 +00:00
Initial commit
This commit is contained in:
parent
ca7684985d
commit
49bdd4dda1
60 changed files with 1527 additions and 30 deletions
15
vscode/Chapter03/Ch03Ex02LoopsAndOverflow/Program.cs
Normal file
15
vscode/Chapter03/Ch03Ex02LoopsAndOverflow/Program.cs
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
checked
|
||||
{
|
||||
try
|
||||
{
|
||||
int max = 500;
|
||||
for (byte i = 0; i < max; i++)
|
||||
{
|
||||
WriteLine(i);
|
||||
}
|
||||
}
|
||||
catch (OverflowException ex)
|
||||
{
|
||||
WriteLine($"{ex.GetType()} says {ex.Message}");
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue