PrinterSettings.PrinterResolutionCollection.Item Property (Int32)


Gets the PrinterResolution at a specified index.

Namespace:   System.Drawing.Printing
Assembly:  System.Drawing (in System.Drawing.dll)

public virtual PrinterResolution this[
	int index
] { get; }


Type: System.Int32

The index of the PrinterResolution to get.

Property Value

Type: System.Drawing.Printing.PrinterResolution

The PrinterResolution at the specified index.

The following code example populates the comboPrintResolution combo box with the supported resolutions. The example requires that a PrintDocument variable named printDoc exists and that the specific combo box exists.

// Add list of printer resolutions found on the printer to the combobox.
// The PrinterResolution's ToString() method will be used to provide the display string.

PrinterResolution pkResolution;
for (int i = 0; i < printDoc.PrinterSettings.PrinterResolutions.Count; i++){
    pkResolution = printDoc.PrinterSettings.PrinterResolutions[i];

.NET Framework
Available since 1.1
Return to top