public abstract class WizardPage : UserControl { private Wizard wizard; public WizardPage(ref Wizard wizardRef) { wizard = wizardRef; // hmmm... is it just a copy now ? :) } public abstract void OnBack(); public abstract void OnActivate(); public abstract void OnNext(); ... }
Wizard
ref
private Wizard wizard; public WizardPage(Wizard wizard) { this.wizard = wizard; }
{ object o1 = new object(); // o1 is a reference to an real instance in the memory object o2; // o2 is a empty reference yet o2 = o1; // o2 is a reference to the same instance // referenced by o1, not a reference to an own instance (!!) }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)