Exemple #1
0
    static void Main()
    {
        String data = "some important data";

        SupplyCabinet supplies = new SupplyCabinet();

        Employee hrLady = new Employee();

        data.Validate();
        supplies.Validate();
        hrLady.Validate();
    }
Exemple #2
0
    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();
    }
Exemple #3
0
        public static void Validate(this SupplyCabinet cab)
        {
            // Do something to validate the SupplyCabinet instance.

            Console.WriteLine("Supply Cabinet Validated.");
        }