c# - Values updating on debug but not on runtime -


i have weird problem explain here. have wizard multiple screens. in first screen reading xml file , been read , values shown/used screens. in 1 of screen, changing these values , hit update button update data. @ end of wizard, when click finish changed values not saved properly. have confirmed code changed values not present while exporting data.

but real kick came when started debugging. till debugging when data being exported. started debugging start of wizard. noticed while debugging that, when hit update button after changing values, time values updated , correct data exported. when run application in runtime or put debug point directly @ export process, changed data not reflected.

so problem is, when debug changed values being exported , in runtime not. can suggest me on this?

however noticed later in runtime updating , not. gets updated when debug. if matters, using winforms , mvp.

edit

i must admit when put thread.sleep(2000) @ end of update button event method, looks , works fine. way not being appreciated code reviewers , either method not pleasing me.

edit again

the update button uses main thread , updates value in same thread. however, when click finish, creating backgroundworker , running exportdata method there. cannot see more threads there present observation , knowledge.


Comments