C# program to demonstrate the use of finally blocks
Program.cs
strings=null;try{Console.WriteLine("Length: "+s.Length);}catch(Exceptione){Console.WriteLine("Exception caught");}finally{Console.WriteLine("Finally block is always get executed");}
Output
kodingwindow@kw:~/csharp$ dotnet run
Exception caught
Finally block is always get executed
kodingwindow@kw:~/csharp$
Dear User, Thank you for visitng KodingWindow. If you are interested in technical articles, latest technologies, and our journey further, please follow us on LinkedIn.
Dear User, We are grateful for your interest in the KodingWindow Android app. We intend to soon make it available on the Google Play Store. Currently, you need to install apk manually. Would you like to get the app? Minimum Requirement(s): Android 10