PI06 i PI06-1. Docker definitions for MSSQL and Postgres. Data seeder/generator for countries and people. Entity Framework example with variants for Postgres and MSSQL
This commit is contained in:
20
DefensiveProgramming/Using/Program.cs
Normal file
20
DefensiveProgramming/Using/Program.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using Using;
|
||||
|
||||
try
|
||||
{
|
||||
C a1 = new C("A1");
|
||||
|
||||
using (C b2 = new C("B2"))
|
||||
using (C d4 = new C("D4"))
|
||||
{
|
||||
C c3 = new C("C3");
|
||||
throw new Exception("It is time for an exception");
|
||||
}
|
||||
a1.Dispose();
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Console.WriteLine("Exc: " + exc.Message);
|
||||
//throw exc;
|
||||
//throw;
|
||||
}
|
||||
Reference in New Issue
Block a user