🟣 C# / .NET 6+
Get Video Controllers Report (C#)
Queries Win32_VideoController via WMI (System.Management) and prints Video Controllers to the console.
GetVideoControllerReport.cs
// GetVideoControllerReport.cs
//
// Reports Video Controllers via WMI (Win32_VideoController).
//
// Requires the System.Management package:
// dotnet new console -o VideoControllerReport
// dotnet add package System.Management
// (replace the generated Program.cs with this file, then dotnet run)
// On .NET Framework, System.Management is already available — just
// add a reference to it in your project.
using System;
using System.Management;
var searcher = new ManagementObjectSearcher("SELECT Name, AdapterRAM, DriverVersion, CurrentRefreshRate FROM Win32_VideoController");
int count = 0;
foreach (ManagementObject item in searcher.Get())
{
Console.WriteLine($"Name: {item["Name"]}");
Console.WriteLine($"AdapterRAM: {item["AdapterRAM"]}");
Console.WriteLine($"DriverVersion: {item["DriverVersion"]}");
Console.WriteLine($"CurrentRefreshRate: {item["CurrentRefreshRate"]}");
Console.WriteLine(new string('-', 40));
count++;
}
if (count == 0)
{
Console.WriteLine("No Video Controllers found.");
}
else
{
Console.WriteLine($"\n{count} Video Controllers found.");
}