There is a textbox myTextBox in my WPF application.
The myTextBox.Text value is used by a button function for a few times.
I would like to know is there any difference in PERFORMANCE and MEMORY USAGE for the following cases:
a) Directly use myTextBox.Text for a few times
Call functionA(myTextBox.Text);
Call functionB(myTextBox.Text);
or
b) Declare a variable first then use it in the latter part
string str = myTextBox.Text;
Call functionA(str);
Call functionB(str);
Thanks.
It would be great if any reference link or further reading for such information.