Пример #1
0
        public static void getForecast()
        {
            weather = new Weather();
            string[] foundConditions = weather.getWeather();
            Thread   forecast        = new Thread(new ThreadStart(() => speak.sayForecast(foundConditions)));

            forecast.IsBackground = true;
            forecast.Start();
        }
Пример #2
0
        //....................................................................................................

        //........................................Weather.....................................................
        public static void getWeather()
        {
            //Get the weather conditions
            weather = new Weather();
            string[]    foundConditions    = weather.getWeather();
            ThreadStart weatherThreadStart = new ThreadStart(() => speak.sayWeather(foundConditions));
            Thread      weatherThread      = new Thread(weatherThreadStart);

            weatherThread.IsBackground = true;
            weatherThread.Start();
        }