Using a Button Tag
Assuming program logic changes a button tag based on something random - but using the UI thread. Is the Button Tag value reliable to use in a click event? i.e. Will it be the same value as-at the time of the event handler as it was at the time of the click? If not, what is the best method to pass an event specific parameter into a button click event that will be safe? Update Added an example as requested. (Remember this is just theoretical). Windows.Forms.Timer timer = new Timer(); timer.Interval = 1; timer.Tick += new EventHandler(timer_tick); timer.Start(); void timer_tick(object sender, Eve
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.