ninja239
ninja239
CC#
Created by ninja239 on 8/10/2023 in #help
❔ How do I use LINQ to get Friends younger than 50?
So something like this:
// get all friends younger than 50.
var now = DateTime.Now;
var youngFriendsQuery =
from friend in friends
where (friend.BirthDate > now.AddYears(-50))
select friend;
// get all friends younger than 50.
var now = DateTime.Now;
var youngFriendsQuery =
from friend in friends
where (friend.BirthDate > now.AddYears(-50))
select friend;
11 replies
CC#
Created by ninja239 on 8/10/2023 in #help
❔ How do I use LINQ to get Friends younger than 50?
thx
11 replies