Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
PrintPort Class
Collapse the table of content
Expand the table of content

PrintPort Class

Represents a printer port on a print server. Each print queue has a print port assigned to it.

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

public sealed class PrintPort : PrintSystemObject

The PrintPort type exposes the following members.

Public propertyNameGets the name of the object. (Inherited from PrintSystemObject.)
Public propertyParentGets the parent of the object. (Inherited from PrintSystemObject.)
Public propertyPropertiesCollectionGets a collection of attribute and value pairs. (Inherited from PrintSystemObject.)

Public methodCommitDo not use. (Overrides PrintSystemObject.Commit().)
Public methodDispose()Releases all resources used by the PrintSystemObject. (Inherited from PrintSystemObject.)
Public methodEquals(Object)Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public methodGetHashCodeServes as the default hash function. (Inherited from Object.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodRefreshDo not use. (Overrides PrintSystemObject.Refresh().)
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)

The PrintQueue.QueuePort property holds the PrintPort object that is assigned to the queue.

Caution noteCaution

Classes within the System.Printing namespace are not supported for use within a Windows service or ASP.NET application or service. Attempting to use these classes from within one of these application types may produce unexpected problems, such as diminished service performance and run-time exceptions.

If you want to print from a Windows Forms application, see the System.Drawing.Printing namespace.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
© 2015 Microsoft