Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class test {
- public int id { get; set; }
- public string name { get; set; }
- }
- List<test> l = new List<test>();
- int maxLength = l.Max(x => x.name.Length);
- var longestLenght = l.Max(r => r.name.Length);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement