--- title: "How to: Get Print System Object Properties Without Reflection" ms.date: "03/30/2017" dev_langs: - "csharp" - "vb" helpviewer_keywords: - "PrintSystemObject [WPF], getting properties" ms.assetid: 43560f28-183d-41c1-b9d1-de7c2552273e --- # How to: Get Print System Object Properties Without Reflection Using reflection to itemize the properties (and the types of those properties) on an object can slow application performance. The namespace provides a means to getting this information with using reflection. ## Example The steps for doing this are as follows. 1. Create an instance of the type. In the example below, the type is the type that ships with Microsoft .NET Framework, but nearly identical code should work for types that you derive from . 2. Create a from the type's . The property of each entry in this dictionary is an object of one of the types derived from . 3. Enumerate the members of the dictionary. For each of them, do the following. 4. Up-cast the value of each entry to and use it to create a object. 5. Get the type of the of each of the object. [!code-csharp[GetPrintObjectPropertyTypesWithoutReflection#ShowPropertyTypesWithoutReflection](~/samples/snippets/csharp/VS_Snippets_Wpf/GetPrintObjectPropertyTypesWithoutReflection/CSharp/Program.cs#showpropertytypeswithoutreflection)] [!code-vb[GetPrintObjectPropertyTypesWithoutReflection#ShowPropertyTypesWithoutReflection](~/samples/snippets/visualbasic/VS_Snippets_Wpf/GetPrintObjectPropertyTypesWithoutReflection/visualbasic/program.vb#showpropertytypeswithoutreflection)] ## See also - - - - - - - - [Documents in WPF](documents-in-wpf.md) - [Printing Overview](printing-overview.md)