Vote UpVote

c# – Why does Try-Catch require curly braces – Stack Overflow

The Wiert Corner – From my SO Question Archive: Just curious: Why is the syntax for try catch in C# (Java also?) hard coded for multiple statements? Why doesn’t the language allow: int i; string s = DateTime.Now.Seconds % 2 == 1 ? "1" : "not 1"; try i = int.Parse(s); catch i = 0; The example is for trivial purposes only. I know there’s int.TryParse. [WayBack] c# – Why does Try-Catch require curly braces – Stack Overflow. I asked this question partially because of my Delphi background where there are two try statements (one for finally and one for except a.k.a. catch) neither having ...
Favorite? Off-Topic? jpluimers @ 2017-12-27 06:05


Visits: 7995
Votes: 0
Favorites: 0
Off-Topic: 0

Visits by Source

User Actions

Users who voted for this posting

Contact us to advertise on DelphiFeeds.com

Community Links

Torry Firebird News


Please login or register to use this functionality.
(click on this box to dismiss)