Export (0) Print
Expand All

How to: Identify Code Variables 

Visual Studio 2005

The CodeVariable element contains the identifiers for an IDE element that is a specific control or derives from a common base class.

Example

You can identify any controls that derive from a common base class. For example, you can look for any controls derived from System.Windows.Forms.ListView. The important distinction between the user-created class scenario (see How to: Identify a User-Created Class) and this scenario is that controls, when used, are code variables within a class. To identify them, use the CodeVariable element. Because inheritance is important, use the identifier TypeInherits rather than TypeName.

<CodeVariable Id="codeDerivedListView">
<Identifiers>
</CodeVariable>

You can also identify specific controls. Assume you are only concerned with ListView controls but not controls derived from ListView. In this case you could use the following identification instead of the one above.

<CodeVariable Id="codeJustListView">
<Identifiers>
</CodeVariable>

See Also

Community Additions

ADD
Show:
© 2015 Microsoft