.NET Framework Class Library
PrintProperty Class
Represents a property (and the value of the property) of a printing system hardware or software component.
Assembly: System.Printing (in System.Printing.dll)
Syntax
Visual Basic (Declaration)
<SerializableAttribute> _ Public MustInherit Class PrintProperty _ Implements IDisposable, IDeserializationCallback
Visual Basic (Usage)
Dim instance As PrintProperty
C#
[SerializableAttribute] public abstract class PrintProperty : IDisposable, IDeserializationCallback
Visual C++
[SerializableAttribute] public ref class PrintProperty abstract : IDisposable, IDeserializationCallback
JScript
public abstract class PrintProperty implements IDisposable, IDeserializationCallback
Examples
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.
C#
// 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();
Inheritance Hierarchy
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
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.Platforms
Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Version Information
.NET Framework
Supported in: 3.5, 3.0See Also