PrintPropertyDictionary Class
Represents a collection of properties and values that are associated with an object in the System.Printing namespace.
System.Collections::Hashtable
System.Printing.IndexedProperties::PrintPropertyDictionary
Assembly: System.Printing (in System.Printing.dll)
The PrintPropertyDictionary type exposes the following members.
| Name | Description | |
|---|---|---|
![]() | PrintPropertyDictionary() | Initializes a new instance of the PrintPropertyDictionary class. |
![]() | PrintPropertyDictionary(SerializationInfo, StreamingContext) | Initializes a new instance of the PrintPropertyDictionary class and provides it with the specified SerializationInfo and StreamingContext. |
| Name | Description | |
|---|---|---|
![]() | comparer | Obsolete. Gets or sets the IComparer to use for the Hashtable. (Inherited from Hashtable.) |
![]() | Count | Gets the number of key/value pairs contained in the Hashtable. (Inherited from Hashtable.) |
![]() | EqualityComparer | Gets the IEqualityComparer to use for the Hashtable. (Inherited from Hashtable.) |
![]() | hcp | Obsolete. Gets or sets the object that can dispense hash codes. (Inherited from Hashtable.) |
![]() | IsFixedSize | Gets a value indicating whether the Hashtable has a fixed size. (Inherited from Hashtable.) |
![]() | IsReadOnly | Gets a value indicating whether the Hashtable is read-only. (Inherited from Hashtable.) |
![]() | IsSynchronized | Gets a value indicating whether access to the Hashtable is synchronized (thread safe). (Inherited from Hashtable.) |
![]() | Item | Gets or sets the value associated with the specified key. (Inherited from Hashtable.) |
![]() | Keys | Gets an ICollection containing the keys in the Hashtable. (Inherited from Hashtable.) |
![]() | SyncRoot | Gets an object that can be used to synchronize access to the Hashtable. (Inherited from Hashtable.) |
![]() | Values | Gets an ICollection containing the values in the Hashtable. (Inherited from Hashtable.) |
| Name | Description | |
|---|---|---|
![]() | Add(PrintProperty) | Adds the specified object (of a class that is derived from PrintProperty) into the dictionary. |
![]() | Add(Object, Object) | Adds an element with the specified key and value into the Hashtable. (Inherited from Hashtable.) |
![]() | Clear | Removes all elements from the Hashtable. (Inherited from Hashtable.) |
![]() | Clone | Creates a shallow copy of the Hashtable. (Inherited from Hashtable.) |
![]() | Contains | Determines whether the Hashtable contains a specific key. (Inherited from Hashtable.) |
![]() | ContainsKey | Determines whether the Hashtable contains a specific key. (Inherited from Hashtable.) |
![]() | ContainsValue | Determines whether the Hashtable contains a specific value. (Inherited from Hashtable.) |
![]() | CopyTo | Copies the Hashtable elements to a one-dimensional Array instance at the specified index. (Inherited from Hashtable.) |
![]() | Dispose() | Releases all the resources that are being used by the PrintPropertyDictionary. |
![]() | Dispose(Boolean) | Releases the unmanaged resources that are being used by the PrintPropertyDictionary and optionally releases the managed resources. |
![]() | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) |
![]() | Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) |
![]() | GetEnumerator | Returns an IDictionaryEnumerator that iterates through the Hashtable. (Inherited from Hashtable.) |
![]() | GetHash | Returns the hash code for the specified key. (Inherited from Hashtable.) |
![]() | GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) |
![]() | GetObjectData | Populates a SerializationInfo with the data that is needed to serialize the PrintPropertyDictionary. (Overrides Hashtable::GetObjectData(SerializationInfo, StreamingContext).) |
![]() | GetProperty | Gets the object (of a class that is derived from PrintProperty) that represents the specified property. |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() | KeyEquals | Compares a specific Object with a specific key in the Hashtable. (Inherited from Hashtable.) |
![]() | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() | OnDeserialization | Implements the ISerializable interface and raises the deserialization event when the deserialization is complete. (Overrides Hashtable::OnDeserialization(Object).) |
![]() | Remove | Removes the element with the specified key from the Hashtable. (Inherited from Hashtable.) |
![]() | SetProperty | Sets the value of the specified attribute to an object of a class that is derived from PrintProperty. |
![]() | ToString | Returns a string that represents the current object. (Inherited from Object.) |
The collection takes the form of a Hashtable dictionary. The Value property of each DictionaryEntry in the collection is an instance of a class that is derived from PrintProperty.
The following example shows how to use this class to install a second printer that differs in its properties from an existing printer only in location, port, and shared status.
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.
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.
