This sample tool will search assemblies for class names and return summary information about a class if it is found. It extensively uses the System.Reflection functionality.
By default, the sample only searches the mscorlib assembly. You must specify the -m option to explicitly load other assemblies to be searched.
The following table shows the command-line options used by the sample.
| Option | Description |
|---|---|
| -a level | Specifies abbreviation level, where level is short, medium, or long. |
| -w | Generates output in HTML format. |
| -f | Shows fully qualified names in output. |
| -m module | Loads and searches the module assembly. |
| -noinherit | Prevents the display of inherited methods and fields. |
| -o | Shows only class names within modules (use with the -m option). |
| -q | Suppresses error output. |
| -v | Displays only output visible (public and protected) classes, methods, or fields. |
| -p | Displays only output public classes, methods, or fields. |
| -h | Shows usage help. |
The sample source is found in rotor\samples\utilities\corclass.
The source files are:
The build output location is %TARGETCOMPLUS%\samples\utilities\corclass. The output file is an executable assembly named corcls.exe.
All samples are built from the buildall script.
You can also build all the
samples by switching to the root of the sample directory, sscli\samples, and typing
build -c.
You can build this specific sample by switching to the sample directory and typing
build -c.
These steps require that the Shared Source CLI (SSCLI) be already built and functional.
clix corcls classname
where classname is the name of the type for which you are searching.
Copyright (c) 2002 Microsoft Corporation. All rights reserved.