Пример #1
0
        public static async Task ChangeMsgAsync(string msg)
        {
            var a1 = MyClassFactory.GetMyClassObject();
            //Action<string> action = s => s = msg;

            await Task.Run(() =>
            {
                Task.Delay(100);
                a1.Message = msg;
                // action(a1.Message);
            });
        }
Пример #2
0
        public static void ChangeMsgSync(string msg)
        {
            var a1 = MyClassFactory.GetMyClassObject();

            a1.Message = msg;
        }