PrintProperty Class
.NET Framework 4
Represents a property (and the value of the property) of a printing system hardware or software component.
Namespace:
System.Printing.IndexedProperties
Assembly: System.Printing (in System.Printing.dll)
The PrintProperty type exposes the following members.
| Name | Description | |
|---|---|---|
![]() | IsDisposed | Gets or sets a value that indicates whether the object has been disposed. |
![]() | IsInitialized | Gets or sets a value that indicates whether the object has been initialized. |
![]() | Name | When overridden in a derived class, gets the name of the property that the object represents. |
![]() | Value | When overridden in a derived class, gets or sets the value of the property that the object represents. |
| Name | Description | |
|---|---|---|
![]() | Dispose() | Releases all resources that are being used by the PrintProperty. |
![]() | Dispose(Boolean) | Releases the unmanaged resources that are being used by the PrintProperty and optionally releases the managed resource. |
![]() | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) |
![]() | Finalize | Enables a PrintProperty to attempt to free resources and to perform other cleanup operations before the PrintProperty is reclaimed by garbage collection. (Overrides Object.Finalize().) |
![]() | GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() | InternalDispose | Releases the unmanaged resources that are being used by the PrintProperty and optionally releases the managed resources. |
![]() | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() | OnDeserialization | When overridden in a derived class, implements the ISerializable interface and raises the deserialization event when the deserialization is complete. |
![]() | ToString | Returns a string that represents the current object. (Inherited from Object.) |
The following example shows how to use this class to discover at run time the properties, and the types of those properties, of a print system object, without using reflection.
// Enumerate the properties, and their types, of a queue without using Reflection
LocalPrintServer localPrintServer = new LocalPrintServer();
PrintQueue defaultPrintQueue = LocalPrintServer.GetDefaultPrintQueue();
PrintPropertyDictionary printQueueProperties = defaultPrintQueue.PropertiesCollection;
Console.WriteLine("These are the properties, and their types, of {0}, a {1}", defaultPrintQueue.Name, defaultPrintQueue.GetType().ToString() +"\n");
foreach (DictionaryEntry entry in printQueueProperties)
{
PrintProperty property = (PrintProperty)entry.Value;
if (property.Value != null)
{
Console.WriteLine(property.Name + "\t(Type: {0})", property.Value.GetType().ToString());
}
}
Console.WriteLine("\n\nPress Return to continue...");
Console.ReadLine();
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
System.Object
System.Printing.IndexedProperties.PrintProperty
System.Printing.IndexedProperties.PrintBooleanProperty
System.Printing.IndexedProperties.PrintByteArrayProperty
System.Printing.IndexedProperties.PrintDateTimeProperty
System.Printing.IndexedProperties.PrintDriverProperty
System.Printing.IndexedProperties.PrintInt32Property
System.Printing.IndexedProperties.PrintJobPriorityProperty
System.Printing.IndexedProperties.PrintJobStatusProperty
System.Printing.IndexedProperties.PrintPortProperty
System.Printing.IndexedProperties.PrintProcessorProperty
System.Printing.IndexedProperties.PrintQueueAttributeProperty
System.Printing.IndexedProperties.PrintQueueProperty
System.Printing.IndexedProperties.PrintQueueStatusProperty
System.Printing.IndexedProperties.PrintServerLoggingProperty
System.Printing.IndexedProperties.PrintServerProperty
System.Printing.IndexedProperties.PrintStreamProperty
System.Printing.IndexedProperties.PrintStringProperty
System.Printing.IndexedProperties.PrintSystemTypeProperty
System.Printing.IndexedProperties.PrintThreadPriorityProperty
System.Printing.IndexedProperties.PrintTicketProperty
System.Printing.IndexedProperties.PrintProperty
System.Printing.IndexedProperties.PrintBooleanProperty
System.Printing.IndexedProperties.PrintByteArrayProperty
System.Printing.IndexedProperties.PrintDateTimeProperty
System.Printing.IndexedProperties.PrintDriverProperty
System.Printing.IndexedProperties.PrintInt32Property
System.Printing.IndexedProperties.PrintJobPriorityProperty
System.Printing.IndexedProperties.PrintJobStatusProperty
System.Printing.IndexedProperties.PrintPortProperty
System.Printing.IndexedProperties.PrintProcessorProperty
System.Printing.IndexedProperties.PrintQueueAttributeProperty
System.Printing.IndexedProperties.PrintQueueProperty
System.Printing.IndexedProperties.PrintQueueStatusProperty
System.Printing.IndexedProperties.PrintServerLoggingProperty
System.Printing.IndexedProperties.PrintServerProperty
System.Printing.IndexedProperties.PrintStreamProperty
System.Printing.IndexedProperties.PrintStringProperty
System.Printing.IndexedProperties.PrintSystemTypeProperty
System.Printing.IndexedProperties.PrintThreadPriorityProperty
System.Printing.IndexedProperties.PrintTicketProperty
