C#:使用类型变量是什么意思?

Zac*_*ith 0 c# types

我是C#的新手,来自Javascript背景(所以'打字'对我来说是个新手).

警告"......是变量但是像类型一样使用"是什么意思?

我在一个名为的静态函数中有以下代码test:

var activeCell = new ExcelReference(1, 1);
Type type = typeof(activeCell);
Run Code Online (Sandbox Code Playgroud)

Rus*_*Art 8

例如,您只能使用typeof某种类型Type type = typeof(ExcelReference);

如果你想知道这个变量使用什么类型 Type type = activeCell.GetType();