3 Replies
You can return that value from the method
Then call it
And boom, you have the value
Methods - C# Programming Guide
A method in C# is a code block that contains a series of statements. A program runs the statements by calling the method and specifying arguments.
solved