ENVDTE中声明的类变量 [英] Type of declared Class Varaible in ENVDTE
问题描述
我想知道使用 CodeVariable
或 CodeElement 类的2个声明的类变量的数据类型。
我能找到,如果这个变量声明为私有和其他细节,但不知道如何检查此声明变量的数据类型。
行变量的数据类型应为 DataGridRow 。
自动化模型(EnvDTE) )有一些限制:
- 方法级别的变量/常量:不支持
- 变量/常量at类级别:您获得有关变量/常量类型的有限信息:
EnvDTE.CodeVariable.Type ,返回
CodeTypeRef
为了获得更好的支持,在VS 2015及更高版本中,您可以使用Roslyn( .NET编译器平台),即VS使用的相同解析器/编译器/解析器等。
I want to know the data type of 2 declared class variables using CodeVariable or CodeElement class.
I am able to find that if this variable declared as private and other details but not know how to check the data type of this declared variable.
data type of row variable should be DataGridRow.
Hi,
The automation model (EnvDTE) has some limitations:
- Variables/constants at method level: not supported
- Variables/constants at class level: you get limited information about the type of the variable/constant: EnvDTE.CodeVariable.Type, which returns a CodeTypeRef
For better support, in VS 2015 and higher you can use Roslyn (.NET Compiler Platform), that is, the same parser/compiler/resolver, etc. that VS uses.
这篇关于ENVDTE中声明的类变量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!