Category Archives: C#

How Many Connected Screens?

To determine the number of monitors connected to a computer with C#, you can use the System.Windows.Forms.Screen class, which provides a static AllScreens property that returns an array of Screen objects, one for each display device connected to the computer. You can then use the Length property of the array to determine the number of screens.