NasaPicOfDay.BackgroundChanger.GetCurrentScreenResolution C# (CSharp) Метод

GetCurrentScreenResolution() приватный Метод

Retrieves the user's current screen resolution to try and pick the image that will fit.
private GetCurrentScreenResolution ( ) : void
Результат void
        private void GetCurrentScreenResolution()
        {
            try
             {
            var width = Screen.PrimaryScreen.Bounds.Width;
            var height = Screen.PrimaryScreen.Bounds.Height;

            _currentScreenResolution = string.Format("{0}x{1}", width, height);
             }
             catch
             {
            //default in the event of an error
            _currentScreenResolution = "1600x1200";
             }
        }