To list all printers of system in C# and VB.NET you can use the following snippet.
Sample C#
for (var i = 0; i < System.Drawing.Printing.PrinterSettings.InstalledPrinters.Count; i++) { var printer = System.Drawing.Printing.PrinterSettings.InstalledPrinters[i]; MessageBox.Show(printer); }
Sample VB.NET
For i As var = 0 To System.Drawing.Printing.PrinterSettings.InstalledPrinters.Count - 1 Dim printer = System.Drawing.Printing.PrinterSettings.InstalledPrinters(i) MessageBox.Show(printer) Next
RT @CodeSnippetsNET: How to list all printers of system in .NET http://t.co/Gbvo4zx2em #csharp #vb #dotnet #programming