Udostępnij za pośrednictwem


Windows Forms Class Viewer (Wincv.exe)

The Windows Forms Class Viewer allows you to quickly look up information about a class or series of classes, based on a search pattern. The class viewer displays information by reflecting on the type using the common language runtime reflection API.

The Windows Forms Class Viewer only ships with the .NET Framework SDK version 1.0 and 1.1.

wincv [options]

Remarks

The following table describes the options available.

Option

Description

/h

Displays command syntax and options for the tool.

/hide:type

Hides the specified member type. You must specify protected, private, internal, or inherited as the type argument. If you do not specify this option, protected, private, and internal types are hidden by default. To specify multiple member types to hide, specify the /hide option multiple times on the command line separated by a space. For example, /hide:protected /hide:private.

/nostdlib[+|-]

Specifies whether to load the following default assemblies: mscorlib.dll, System.dll, System.Data.dll, System.Design.dll, System.DirectoryServices.dll, System.Drawing.dll, System.Drawing.Design.dll, System.Messaging.dll, System.Runtime.Serialization.Formatters.Soap.dll, System.ServiceProcess.dll, System.Web.dll, System.Web.Services.dll, System.Windows.Forms.dll, System.XML.dll,

If you specify the plus symbol (+), Wincv.exe does not load the default assemb lies. The default is /nostdlib-, which loads the default assemblies.

/r:assemblyFile

Specifies an assembly to load and browse.

/show:type

Displays the specified member type. You must specify protected, private, internal, or inherited as the type argument. If you do not specify this option, only inherited types are displayed by default. To specify multiple member types to display, specify the /show option multiple times on the command line separated by a space. For example, /show:protected /show:private.

@fileName

Reads the specified response file for more options.

/?

Displays command syntax and options for the tool.

Start Wincv.exe from the command line and type all or part of a type name in the text box at the top of the form. The list box on the left side of the form displays a list of all the types that Wincv.exe finds, based on the name you entered. The System namespace is implied on the class names. Therefore, type "Object" is displayed in the list of class names instead of "System.Object". When you select a type from the list, the type definition appears in the area on the right. The type definition is displayed using a C# like syntax. Note, however, that not all type definitions will compile in the C# compiler exactly as they are shown in the viewer. The following example demonstrates how to look up information on the ButtonBase class.

To locate a type definition using Wincv.exe

  1. Type wincv at the command prompt. This loads the default assemblies and displays the Class Viewer.

  2. Type Button in the text box at the top of the form.

  3. Select the ButtonBase class name in the System.Windows.Forms namespace from the types displayed in the list box on the left side of the form.

    The definition of System.Windows.Forms.ButtonBase appears in the area on the right.

Examples

The following command runs Wincv.exe and loads myApp.exe and the default assemblies for browsing.

wincv /r:myApp.exe

The following command runs Wincv.exe and loads only myApp.exe for browsing. The default assemblies do not load.

wincv /r:myApp.exe /nostdlib+

The following code shows the contents of a response file myFile.rsp. Using a response file eliminates the need to individually type the commands at the command prompt.

/r:myAssembly.dll
/r:myOtherAssembly.dll

The following command reads the response file myFile.rsp and executes the commands specified in the file.

wincv @myFile.rsp

See Also

Reference

.NET Framework Tools

MSIL Disassembler (Ildasm.exe)

Other Resources

Reflection