I'm trying to express your question in valid c# code:
void MethodA(int param) {
MethodB();
}
void MethodB() {
}
Solution:
- Pass the parameter to MethodB (but that means modifying MethodB's signature):
void MethodA(int param) {
MethodB(param);
}
void MethodB(int param) {
}
OR
- Use a global variable outside of your methods:
int _param;
void MethodA(int param) {
_param = param;
MethodB();
}
void MethodB() {
}