嘿,我被困在将简单的Linq语句从查询语法转换为流畅的C#语法。我认为这是可能的,但我需要一个提示。将LINQ语句从查询转换为流畅的c#语法
from property in target.GetType().GetProperties()
select new
{
Name = property.Name,
Value = property.GetValue(target, null)
};
到..
var props = target.GetType().GetProperties().Select(p=>p.Name....)
我需要Select
后更改?
你到底在问什么? – driis 2011-05-11 20:16:44
'....'是我的问题。对不清楚的问题抱歉。我的编辑正确 – Custodio 2011-05-11 20:33:01