Exemple #1
0
        static void Main(string[] args)
        {
            #region Using Vector<T>

            // To create an instance of the Vector<T> type,
            //  we must provide a type parameter.
            Vector <int> first = new Vector <int>(5);
            first.Fill(3);
            Console.WriteLine(first.ToString());

            Vector <int> second = new Vector <int>(5);
            second.Fill(2);
            second[3] = 14;
            Console.WriteLine(second.ToString());

            #endregion

            #region Using VectorSorter<T>

            VectorSorter <int> .Sort(second);

            #endregion

            #region Using Printables

            PrintableClass[] printables = new PrintableClass[2];
            printables[0] = new PrintableClass();
            printables[1] = new PrintableClass();
            Printing.PrintAll(printables);

            #endregion

            #region Using default(T)

            PrintDefaultValue <int>();
            PrintDefaultValue <bool>();
            PrintDefaultValue <string>();

            #endregion
        }
Exemple #2
0
 public void Print(PrintableClass value)
 {
     throw new NotImplementedException();
 }