Hi,
In the constructor of a class, I am taking as a parameter the
reference to a "bool", as in this code:
-----------------------
public class TCP_synch_client
{
public string address ="";
public int port =0;
public TCP_synch_client(string address1,int port1,ref bool
running1)
{
address =address1;
port =port1;
// How can I store "running1" (which is a reference) in one of
the variables of the class?
}
}
-----------------------
I want to use that reference from other methods of the class. How can
I store that reference "running1" in one of the variables of the
class, and how do I declare that variable?
Is there a solution without having to change (as I suspect) "bool" by
a class or struct type? I would like to do it without having to
encapsulate my "bool" inside a class or a struct.
Thank you.