© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•13mo ago•
49 replies
77_105_114_111

✅ Try catch exception.

What is the best way to keep doing a do while loop if an exception has been caught?

Atm if I create the exception code within the do while loop the variables are not then declared even though they are
The following example works but exits out of the do while loop.
variables
try{
do{code}
while{code} }
catch(Exception){code}
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

✅ Why doesn't this try catch, catch exception.
C#CC# / help
10mo ago
exception subclass for try-catch block [Answered]
C#CC# / help
4y ago
✅ try catch
C#CC# / help
3y ago