Can I declare / use some variable in LINQ?
For example, can I write following LINQ clearer?
var q = from PropertyDescriptor t in TypeDescriptor.GetProperties(instance)
where (t.ComponentType.GetProperty(t.Name) != null)
select t.ComponentType.GetProperty(t.Name);
Are there ways to not write / call t.ComponentType.GetProperty(t.Name)
two times here?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…