public Datum(string nm, Func <T> variable) { name = nm; //most variables can use standard tostring method - if not will have to add if statements to build custom string methods { stringFunc = () => variable().ToString();//toString(()=>variable()); } }
public static void Main() { stringFunction del = new stringFunction(Hey); del("Hey there!"); //this is the value that is delegated to the Hey var }
public void setCallback(stringFunction newCallback) { callback = newCallback; }