假设我有一个excel传播表,如下所示:
col1 col2 ------------ dog1 dog dog2 dog dog3 dog dog4 dog cat1 cat cat2 cat cat3 cat
我想根据"狗"或"猫"返回一系列细胞(dog1,dog2,dog3,dog4)或(cat1,cat2,cat3)
我知道我可以循环检查一个接一个,但是在VBA中是否还有其他方法,所以我可以一次性"过滤"结果?
也许Range.Find(XXX)可以提供帮助,但我只看到一个单元格而不是一系列单元格的示例.
请指教
问候
我正在尝试在运行时获取类memeber变量列表.我知道这可能是使用typeof和反射.但找不到一个例子.请有人为我照亮.
这是伪代码示例:
Class Test01
{
public string str01;
public string str02;
public int myint01;
}
Run Code Online (Sandbox Code Playgroud)
我想要这样的东西(伪代码):
Test01 tt = new Test01();
foreach(variable v in tt.PublicVariableList)
{
debug.print v.name;
debug.print v.type;
}
Run Code Online (Sandbox Code Playgroud)
请帮我弄清楚如何在C#VS2005中做到这一点
非常感谢