New LINQ Methods in .NET 9 🚀
Vložit
- čas přidán 29. 05. 2024
- 🚀 Join the .NET Web Academy: learn.dotnetwebacademy.com
💖 Support me on Patreon for exclusive source code access: / _patrickgod
🐦 Let's get social on Twitter/X: / _patrickgod
🔗 Let's connect on LinkedIn: / patrickgod
🚀 Get the .NET 8 Web Dev Jump-Start Course for FREE: dotnet8.patrickgod.com
The baby will have 10 years of experience working with programming by the age of 20 when he applies for jobs.😁
🤣🤣🤣🤣🤣
I had 14 years of experience when I was 20 and actually invented Facebook in 1992 (age 14) and I'm still poor now while idiots rule the world. Talent is nothing. Your parents providing you with money and/or connections is everything. No matter your abilities.
Thanks you and your baby, :)
I love these - thanks for keeping us updated!
nice! love the Index method
The new LINQ methods in .NET 9:
1. IndexBy(): This one returns a Dictionary for a collection, where the key is the index of "item" in the original collection. I think this is the least useful of the 3 methods.
2. CountBy(): Groups a collection of objects by a property of the object (specified by a lambda expression) and counts the number of items in each group.
3. AggregateBy(): Similar to the array.reduce() function in Javascript. It groups a collection of objects based on a property (specified by a lambda expression). It then adds up the values of a numeric property for each item in each group.
Picture a collection of student objects where each object has a Name and Age property (among others). The AggregateBy() linq method is your go-to for calculating the total age of male students and the total age of female students in one expression.
Thanks!
💯
Just chill Microsoft.
C'mon, you can't still use namespaces with { } scope, they're so old style, use file-scope namespaces! 😄They're simpler and you avoid a lot of useless indentation!
Talk about unnecessary features that can already be done just as easily in other ways ... Is there a committee somewhere whose entire job is making the language libraries more complex?
Well the goal here is to make the code less complex, of course you can do everything with a for loop if you want :)
Thanks a lot ❤️
The baby is also LINQ to you 🥹
Amazing 😻
I'd like to see updated full project tutorials, like those from 3y ago.