본문 바로가기
C#/C# Common

스크린 정보

by doublerabbits 2022. 9. 9.
using System;
using System.Windows.Forms;

namespace ScreenInformation
{
    internal class Program
    {
        static void Main(string[] args)
        {
            Screen[] s = Screen.AllScreens;
            for (int i = 0; i < s.Length; i++)
            {
                Console.WriteLine($"[{i + 1}]");
                Console.WriteLine($"Primary : {s[i].Primary}");
                Console.WriteLine($"DeviceName : {s[i].DeviceName}");
                Console.WriteLine($"BitsPerPixel : {s[i].BitsPerPixel}");
                Console.WriteLine($"Bounds : {s[i].Bounds}");
                Console.WriteLine();
            }
            Console.ReadKey();
        }
    }
}

 

 

 

 

'C# > C# Common' 카테고리의 다른 글

string - byte array  (0) 2022.09.09
프로세스 찾기  (0) 2022.09.09
Reflection  (0) 2022.09.06
Generics  (0) 2022.09.04
?. ??=  (0) 2022.09.04