Try catch in a loop
how to make an infinite loop that includes try - catch in C#
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
VulpesRank #55 · 29.2K reputationPosted Jun 6, 2013, 12:56 PM EDT
You'll need to press Control C to stop it:
Jignesh TrivediRank #16 · 50.3K reputationPosted Jun 6, 2013, 6:58 PM EDT
you can put any statement which is alway true it make your loop infinite.
while(1=1)
{
try
{
}
catch()
{ }
}
hope this will help you.