J
Jesse
Hi Everyone,
Can someone show me how to go about assigning a ref parameter to a variable
so that when updates are made to this variable they are reflected in the
calling object's reference parameter. I want to be able to change the value
of the referenced variable outside of the constructor. eg.
private bool loggedIn;
//Constructor which is called from another form
public void LoginForm(ref bool log)
{
loggedIn = log;
}
private void loginIsTrue()
{
loggedIn = true;
}
I want the 'log' variable back in the calling object to be whatever
'loggedIn' is changed to.
Hope this is clear.
Jesse
Can someone show me how to go about assigning a ref parameter to a variable
so that when updates are made to this variable they are reflected in the
calling object's reference parameter. I want to be able to change the value
of the referenced variable outside of the constructor. eg.
private bool loggedIn;
//Constructor which is called from another form
public void LoginForm(ref bool log)
{
loggedIn = log;
}
private void loginIsTrue()
{
loggedIn = true;
}
I want the 'log' variable back in the calling object to be whatever
'loggedIn' is changed to.
Hope this is clear.
Jesse