C# - How to make a class with multiple methods that return a value?
I have created a class that needs to alter a variable's value when it is
instantiated.
Example: In my LrgDialogBox class I might have:
public LrgDialogBox(ref oldResult)
{
// bunch of code
UserInput();
}
public UserInput()
{
newResult=false;
}
In my main class I create an object of my LrgDialogBox called lrgDia then
I type:
lrgDia = new LrgDialogBox(ref result);
if (result==true) this.exit;
I basically need to know how to make the reference variable "oldResult"
private in my LrgDialogBox class, so that any method can alter its value
so it can be used in my main class. Hopefully without changing the
parameters of my other methods. Please help.
Kris
No comments:
Post a Comment