0

In C#, variable decleared in side try block is local variable or something else.

I have tried to get input under a try block and use it outside. But It throws error in sololearn compilar.

9th Jul 2025, 5:28 AM
Ahnaf Tahmid Enan
Ahnaf Tahmid Enan - avatar
1 Answer
+ 4
show us your code. instead of try-catch, a simpler way is to use TryParse methods if you're doing conversions.
9th Jul 2025, 6:00 AM
Bob_Li
Bob_Li - avatar