Exemple #1
0
        static void Main(string[] args)
        {
            var        methods = new MySpeechMethods();
            MethodInfo myMethod;

            myMethod = SpeechFactory.GetSpeechMethod("Time Please");
            myMethod.Invoke(methods, null);
            myMethod = SpeechFactory.GetSpeechMethod("Volume Down");
            myMethod.Invoke(methods, null);
            myMethod = SpeechFactory.GetSpeechMethod("Volume Up");
            myMethod.Invoke(methods, null);
        }
        static void Main(string[] args)
        {
            var        methods = new MySpeechMethods();
            MethodInfo myMethod;

            myMethod = SpeechFactory.GetSpeechMethod("Thank you");
            myMethod.Invoke(methods, null);
            myMethod = SpeechFactory.GetSpeechMethod("Say something funny");
            myMethod.Invoke(methods, null);
            myMethod = SpeechFactory.GetSpeechMethod("I said funny dammit!");
            myMethod.Invoke(methods, null);
        }