C
C# Learner
Is there a way to avoid the following mess?
int i = 0;
if (someString != null) {
try {
i = Int32.Parse(someString);
} catch (FormatException) {
}
}
More specifically, is there a way of avoiding the ugly empty catch
statement?
int i = 0;
if (someString != null) {
try {
i = Int32.Parse(someString);
} catch (FormatException) {
}
}
More specifically, is there a way of avoiding the ugly empty catch
statement?