PrintProperty Class
.NET Framework 3.0
When overridden in a derived class, 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)
Assembly: System.Printing (in system.printing.dll)
'Declaration <SerializableAttribute> _ Public MustInherit Class PrintProperty Implements IDisposable, IDeserializationCallback 'Usage Dim instance As PrintProperty
/** @attribute SerializableAttribute() */ public abstract class PrintProperty implements IDisposable, IDeserializationCallback
SerializableAttribute public abstract class PrintProperty implements IDisposable, IDeserializationCallback
Not applicable.
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 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.Community Additions
ADD
Show: