Relative Content

Tag Archive for c#winformsbuttonclickcoding-efficiency

Clean short code to show days since button was clicked

There are various buttons in my C# winform and for each button press an action is associated with it. I currently have code where when the button is clicked I record the date the button was clicked, then update the button’s Text to show the number of days ago the button was clicked (along with whatever function the button performs).

Clean short code to show days since button was clicked (Visual C# Winforms)

There are various buttons in my C# winform and for each button press an action is associated with it. I currently have code where when the button is clicked I record the date the button was clicked, then update the button’s Text to show the number of days ago the button was clicked (along with whatever function the button performs).