C# component Confused with its 'storing data' logic

Is there a way to clear all the data of c# component and make it start from scratch? I want it to zero all the data that emerge only after the first computation.

A more specific example: I have a simple “test” file, when I push the button the t parameter of the second component doesn’t go back to 0. How do delete the t values (similarly for any value) of second c# component after I restart the first? (i still want it to store the value while inside the loop).

Thank you!
test.gh (9.7 KB)

PS The problem obviously stems from my lack of understanding of the basics, sorry if this question has reoccured.

Is this how you meant?

test_RE.gh (11.6 KB)

// Rolf

1 Like

thank you, kind of, I connect the first button to both so they reset at the same time. Thank you.