J
J
Jan2020-05-09 17:18:17
C++ / C#
Jan, 2020-05-09 17:18:17

How to get a variable?

There is 1 void which has a variable in it. How to get this variable and use it in another void?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir Korotenko, 2020-05-09
@firedragon

One of the methods

private _someValue;
void FirstMethod(){
   _somevalue = value;
}
void SecondMethod(){
   var value = _somevalue;
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question