static void Main() { String data = "some important data"; SupplyCabinet supplies = new SupplyCabinet(); Employee hrLady = new Employee(); data.Validate(); supplies.Validate(); hrLady.Validate(); }
static void Main() { String data = "some important data"; SupplyCabinet supplies = new SupplyCabinet(); Employee hrLady = new Employee(); data.Validate(); // Force generic version supplies.Validate <SupplyCabinet>(); hrLady.Validate(); }
public static void Validate(this SupplyCabinet cab) { // Do something to validate the SupplyCabinet instance. Console.WriteLine("Supply Cabinet Validated."); }