Passing variable between class and class caller

  • Thread starter Thread starter csgraham74
  • Start date Start date
C

csgraham74

I have inherited a piece of code that i now have to modify.

One of the changes i have to make requires me calling a function to
return a value (i.e., bln_Val)

I then call a class in a different project that has numerous methods.
These methods (functions) are called one by one as part of the flow of
the code. what i want to do is to access my value (bln_Val) in one of
these methods.

how do i pass in by value to the new class or retrieve my value from
the first calling class and make it accessible in the 2nd class.

any help or code samples appreciated.

CG
 
I then call a class in a different project that has numerous methods.
These methods (functions) are called one by one as part of the flow of
the code. what i want to do is to access my value (bln_Val) in one of
these methods.

Just pass the value as an argument to the method. If the method
might /change/ that value, pass it By Reference.
how do i pass in by value to the new class or retrieve my value
from the first calling class and make it accessible in the 2nd class.

Don't even /think/ about the second option.
You're 2nd class would have to know quite a /lot/ about what was
calling it to make this work.

HTH,
Phill W.
 
Back
Top