Advertisement
Guest User

Untitled

a guest
Feb 11th, 2016
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. Expression<Func<TObject, TPropertyType>>
  2.  
  3. Expression<Func<MyObject, int>> expression = x=> x.IntegerProperty;
  4.  
  5. string ObjectPropertyName
  6. Type ObjectType
  7. Type ObjectPropertyType = typeof(ObjectType).GetProperty(ObjectPropertyName).Property
  8.  
  9. Expression<Func<[ObjectType], [ObjectPropertyType]>> expression = x=> x.[ObjectPropertyName];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement