vb.net - Stop further code process anytime -


how break entire process @ point of code process. let's have code process going follows:

methoda: (classx) dim _reprunner new reportrunner() _reprunner.run  process flow: (start process) class(x)methoda->class(f)methodb->class(g)methodc->class(g)metodc->class(h)methodd->class(i)methode->class(i)methodf->(classx)methoda (end proceess) 

let's assume within methodc want break further process. don't want make functions return e.g boolean before accessing next one. there way breake root object call , return?

depends on mean "break." if mean "stop processing in response event" need identify how event exposed code.

let's assume "break" event sets variable called globals.breakrequested. need modify code this:

class f {     public bool methodb()     {         bool result = dosomething();         if (globals.breakrequested) return result;         var next = new g();         return next.methodc(result);     } } 

Comments

Popular posts from this blog

c# - Update a combobox from a presenter (MVP) -

How to understand 2 main() functions after using uftrace to profile the C++ program? -

How to put a lock and transaction on table using spring 4 or above using jdbcTemplate and annotations like @Transactional? -