摘要:
public class SendCommand : ICommand
{ public void Execute(object parameter) { var labels = ((object[]) parameter).OfType(); } public bool CanExecute(object parameter) ... 阅读全文
摘要:
这是.NET反射的一个有趣小例子: 通过反射将变量值转为变量名本身. 当然要先添加命名空间:using System.Reflection; 示例代码如下: class Program { string name = "strA"; string strA = "strB"; string strB = "Hello... 阅读全文