Quantcast
Channel: Visual C# forum
Viewing all articles
Browse latest Browse all 31927

return outside nested methods

$
0
0

hello ....

i have nested function and the inner method cause an error  i want to return from the parent method , an example:

public void DoSomething()

{

try

{

}catch(exception){}

}

public void DoAnotherThing()

{

try

{

DoSomething();

}catch(exception){}

}

-- i want to go outside DoAnotherThing() method if DoSomething() method cause an error .

can someone help me



Viewing all articles
Browse latest Browse all 31927

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>