Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Delphi-News aus aller Welt (https://www.delphipraxis.net/58-delphi-news-aus-aller-welt/)
-   -   c# – Why does Try-Catch require curly braces – Stack Overflow (https://www.delphipraxis.net/194714-c-%96-why-does-try-catch-require-curly-braces-%96-stack-overflow.html)

DP News-Robot 27. Dez 2017 05:12

c# – Why does Try-Catch require curly braces – Stack Overflow
 
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 ...http://feeds.feedburner.com/~r/delph...~4/4pHZ8HOIfgY

More...


Alle Zeitangaben in WEZ +1. Es ist jetzt 01:41 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz