The Awesome New LINQ Methods Coming in .NET 9!

2024 ж. 11 Ақп.
53 594 Рет қаралды

Use code MODULAR and get 20% off the brand new "Getting Started with Modular Monoliths" course on Dometrain: dometrain.com/course/getting-...
Become a Patreon and get special perks: / nickchapsas
Hello, everybody, I'm Nick, and in this video, I will introduce you to 3 new LINQ methods coming in .NET 9. Those methods are CountBy, AggregateBy and Index. They were all technically possible before but now it is way easier to implement them.
Workshops: bit.ly/nickworkshops
Don't forget to comment, like and subscribe :)
Social Media:
Follow me on GitHub: github.com/Elfocrash
Follow me on Twitter: / nickchapsas
Connect on LinkedIn: / nick-chapsas
Keep coding merch: keepcoding.shop
#csharp #dotnet

Пікірлер
  • Linq is definitely one of the greatest features of .NET, and I have no idea how I could live without this system.

    @fusedqyou@fusedqyou2 ай бұрын
    • I'm amazed other langages haven't adopted some sort of similar thing. I honestly think it's one of the greatest programming-related inventions.

      @dandandan01@dandandan012 ай бұрын
    • Linq was my gateway to F#. It won't ever happen but kinda wished MS finally acknowledge it IS the better language from the ground up rather than keep patching C#.

      @robhunt8378@robhunt83782 ай бұрын
    • ​@@robhunt8378Thank you. I wanted to write the same comment. People who transitioned to F# are not impressed anymore by LINQ. By the way, F# SQLProvider is awesome (but I didn't succeeded to make it work easily with SQLite and cross platform while it works very well with SQLServer)

      @souleymaneba9272@souleymaneba92722 ай бұрын
    • @@robhunt8378 For your specific use cases F# might be better, but in no way it is or would be remembered as a better language overall. Either you don't have a clue about how the real world of programming is, or you are a troll.

      @poulet_malassis7607@poulet_malassis76072 ай бұрын
    • ​@@poulet_malassis7607 Proof is in the pudding as they say. Functional-first, immutability by default, expressive, concise. MS has been trying to take C# into the F# direction for many years. The cruft is still there. Can't fix bad foundations. Didn't mean to offend anyone though. I forgot people get butthurt even when discussing freakin' programming languages nowadays ROFL.

      @robhunt8378@robhunt83782 ай бұрын
  • "amet", third-person singular present active subjunctive of "amo", which means "to love". It basically means [someone] who loves.

    @yvanricardoecarrigomez@yvanricardoecarrigomez2 ай бұрын
    • Lover?

      @elfanarion@elfanarion2 ай бұрын
    • @@elfanarionit's more "who loves". That is extracted from a text that translates something like: "Nor again is there anyone WHO LOVES or pursues or desires to obtain pain of itself, because it is pain, but because occasionally circumstances occur in which toil and pain can procure him some great pleasure."

      @yvanricardoecarrigomez@yvanricardoecarrigomez2 ай бұрын
    • "Yo amo" in Spanish literally means "I love"

      @unexpectedkAs@unexpectedkAs2 ай бұрын
    • @@unexpectedkAs *yo mama

      @elfanarion@elfanarion2 ай бұрын
    • @@unexpectedkAs Yo no amo. Amar es el comienzo de la palabra Amargura.

      @yvanricardoecarrigomez@yvanricardoecarrigomez2 ай бұрын
  • Finally an Index method, I always created an extension for that

    @neociber24@neociber242 ай бұрын
    • Me too :)

      @zoltanzorgo@zoltanzorgo2 ай бұрын
    • It's such a "duh" moment for me. I've used the .Select() approach many times before and always thought there had to be a better way, but could never think of what that "better" method would be. But now seeing the .Index() method, it seems so obvious.

      @Tsunami14@Tsunami142 ай бұрын
    • Yep it's really convenient. For example Rust has a method like that called enumerate. Same idea.

      @jongeduard@jongeduard2 ай бұрын
    • Ditto here. my function was called WithIndex() so close to this one

      @MrTwiddler0@MrTwiddler02 ай бұрын
  • Thanks for shaing Nick. Please remember to add it to C# 13 & .NET 9 playlist. Keep coding!

    @akeemaweda1716@akeemaweda17162 ай бұрын
  • Good stuff as always! It would have been nice to see how the first 2 examples would be implemented before using the new methods, similar to how you did the Index() one :)

    @ProfessorCodemunkie@ProfessorCodemunkie2 ай бұрын
    • Just navigate to the method's source code, and voilà!

      @krccmsitp2884@krccmsitp28842 ай бұрын
    • CountBy could just be .GroupBy(word => word).Select(g => new { Word = g.Key, Count = g.Count() }) AggregateBy could be .GroupBy(x => x.id).Select(g => new { g.Key, Value = g.Aggregate(seed: 0, func: (totalScore, curr) => totalScore + curr.score) }) I would guess that the new CountBy and AggregateBy would be more optimized than this though. Definitely easier to read and write.

      @JoeEnos@JoeEnos2 ай бұрын
  • I would like bool In(this T value, params T[] source) to be included. It checks whether value is in source, but source vary. Ex.: person.Name.In("Nick", "John", "Bob")

    @Natriumblabla@Natriumblabla2 ай бұрын
    • Essentially the reverse of Contains.

      @evancombs5159@evancombs51592 ай бұрын
    • Yeah, it's the Contains method. Easy enough to write as an extension method.

      @gunnarliljas8459@gunnarliljas84592 ай бұрын
    • That and many others in "Extenso" Code Library

      @mattgordon7797@mattgordon77972 ай бұрын
  • Dammit, we're not even done migrating to .Net 6.0 LOL

    @JP-hr3xq@JP-hr3xq2 ай бұрын
    • at least you removed the word "Framework" from it

      @yegorandrosov6334@yegorandrosov63342 ай бұрын
    • ​@@yegorandrosov6334 I feel that fr

      @Davide__________@Davide__________2 ай бұрын
  • Couldn't you replace the addition assignment operator += in your AggregateBy func lambda with the addition operator +? Sorry if the reviewer in me prevailed your videos are always awesome :)

    @edmondosilvestri7413@edmondosilvestri74132 ай бұрын
  • for the last one you could do *foreach((int index, string line) in lines.Select((line, index) => (index, line))* if you wanted the order to be the same in both.

    @the.ledbetter@the.ledbetter2 ай бұрын
  • I wouldn't mind seeing some LINQ extensions for outer joins. I've been writing my own for a while now.

    @marcusmajarra@marcusmajarra2 ай бұрын
  • I would definitely like a video on more unused or hidden gems of Linq (Maybe some under used but powerful Linq methods) Whats your thoughts on using the sql-linq style keywords instead of Linq methods? I am still waiting for the .NET extension update where it expands on extension methods ;)

    @JustArion@JustArion2 ай бұрын
  • Index is going to be very useful. I often have to use a for loop and get the value, or even manually i++ in foreach. Nice.

    @phizc@phizc2 ай бұрын
  • Woohoo more LINQ features for Resharper to recommend and then not work in Entity Framework queries.

    @benbrist@benbrist2 ай бұрын
  • In your string split method you should have also used the TrimEntries option or at least also added the remaining whitespace characters to your split function.

    @cn-ml@cn-ml2 ай бұрын
  • Amazing new features. This is why C# is the best. :)

    @quantume7143@quantume71432 ай бұрын
    • F# had those for ages. IMO a much betyer language than c#, even for OOP code.

      @Akronymus_@Akronymus_2 ай бұрын
  • Such a nice system!

    @AhmedAymanM@AhmedAymanM2 ай бұрын
  • When I see MaxBy, i expect two exp. 1. Kind of grouping setting. 2 the value for each i want to see max value in each group. Looks strange. It conflict with count by.

    @user-kg5sw4ef4l@user-kg5sw4ef4l2 ай бұрын
  • Nick, could you please make a video with a library named Morelinq. I used it far long to make things like this, but I'm honestly not truly sure about the performance.

    @osr2004snd@osr2004snd2 ай бұрын
  • A better way to do joins/merges in linq would always be helpful.

    @iSoldat@iSoldat2 ай бұрын
  • I wonder, do these new features also work with a system such as EntityFramework IQueryables? I wonder how translation would be done for this.

    @fusedqyou@fusedqyou2 ай бұрын
    • they can always refuse to translate it and throw an exception. even as of now not all LINQ queries are translatable

      @Sander-Brilman@Sander-Brilman2 ай бұрын
    • @@Sander-Brilman No I know, I just wonder if there is going to be translation for these things at all

      @fusedqyou@fusedqyou2 ай бұрын
  • Link to the post is missing in the description

    @zaub3rwalD@zaub3rwalD2 ай бұрын
  • Kinda confusing that the new methods use 'By' to mean 'GroupBy then apply operation to groups', whereas the old ones are reducers and produce a single result. Honestly I think the old semantics make more sense

    @hrobertson4@hrobertson42 ай бұрын
  • A new feature I'd like to see in LINQ is an unstable sort option for Order() / OrderBy(). From my understanding, List.Sort() is faster than List.Order() because Sort() uses an unstable whereas Order() uses a stable sort. Most of the time, I don't need a stable sort.

    @user-ek1gf9px1e@user-ek1gf9px1e2 ай бұрын
  • I'm not even done with Amichai's new vid and my backlog just keeps growing aaaaaaah. Love it :D

    @OllyWood688@OllyWood6882 ай бұрын
    • Lol same😂😂

      @sadrarahmani6246@sadrarahmani62462 ай бұрын
    • Just got through and I think the Unzip() usecase I'm wondering about can maybe be neatly accomplished with AggregateBy() in the future. No particular usecase I'm just a playchild lol

      @OllyWood688@OllyWood6882 ай бұрын
  • Where can I download this preview sdk? Searching o Google directs me nowhere.

    2 ай бұрын
  • You could just zip you lines with a Enumerable of lineNumbers like this: var lines = File.ReadAllLines("input.txt"); var length = lines.Length; var lineNumbers = Enumerable.Range(1, length + 1); foreach (var line in lines.Zip(lineNumbers)) { Console.WriteLine($"{line.Second}: {line.First}"); }

    @01110100011101110110@011101000111011101102 ай бұрын
  • The aggregate is similar to JS reduce

    @user-iu1xg6jv6e@user-iu1xg6jv6e2 ай бұрын
  • LINQ, we need more LIIINQ !

    @antonmartyniuk@antonmartyniuk2 ай бұрын
  • Will the new methods be implemented in ef core?

    @cristiz-vf4ww@cristiz-vf4ww2 ай бұрын
    • Doubtful! I think we're still waiting for EF Core to support .MaxBy() which has existed since .NET 6, I think. It's annoying how EF Core takes a few major versions to catch up.

      @DjDanny32@DjDanny322 ай бұрын
  • I hope they do something to make convertion of dictionary into enumerable any bay more performant. Lot of time sI have a dictionary and Filter with where resulting in an enumerable instead of a new dictionary.

    @garcipat@garcipat2 ай бұрын
    • That's an easy extension method to write.

      @gunnarliljas8459@gunnarliljas84592 ай бұрын
    • @@gunnarliljas8459I know. Those MayBy, MinBy as well. I just wonder if they can make it performant since it feels very unperformant when doing it myself.

      @garcipat@garcipat2 ай бұрын
  • The lyrics of Whenever, Wherever are weird

    @Dustyy01@Dustyy012 ай бұрын
  • So they finally have MoreLinq package built-in. Great. Less nugets to install.

    @miroslavmakhruk4102@miroslavmakhruk41022 ай бұрын
  • Did Microsoft fix edit and continue yet ?

    @unskeptable@unskeptable2 ай бұрын
  • The naming is confusing (but did anyone expected else from Microsoft???) The "By" means something different in "MaxBy" etc where it is reduced and accumulated into single result, vs. these new CountBy means groupBy+apply on the group... This makes it confusing. And the "Index" method.. yeah, but would be probably better something like "WithIndex"

    @urzalukaskubicek9690@urzalukaskubicek96902 ай бұрын
  • omg dotnet 9

    @CodingByAmp@CodingByAmp2 ай бұрын
  • Hmm. Weird seeing the last example. I never would've thought of using linq and would've gone with a for loop instead. Wondering what that might mean from a perf perspective

    @W1ese1@W1ese12 ай бұрын
  • When he says "We just launched a brand new course" I hear "We just lost..." and I feel bad for a split second.

    @TheWolverine1984@TheWolverine19842 ай бұрын
  • I think it's very hard to discover the lesser used linq methods.

    @jerremm@jerremm2 ай бұрын
    • "Every Single LINQ Extension Method With Examples" - kzhead.info/sun/apGJZrGwo2ebn58/bejne.html. I wish I had this video a decade+ ago.

      @user-ek1gf9px1e@user-ek1gf9px1e2 ай бұрын
  • any hint at a .ForEach() ?

    @yetanotherdex@yetanotherdex2 ай бұрын
    • it's slow?

      @MC_DarkMaster@MC_DarkMaster2 ай бұрын
    • Probably not. This choice is by design. They only wanted to add pure functions to System.Linq.Enumerable, nothing with side effects. And foreach is by definition imperative. It performs work, it does not produce output values. Apart from that it's extremely simple to write one yourself.

      @jongeduard@jongeduard2 ай бұрын
    • ​@@jongeduard Many of the linq functions are very easy to write. If that is any metric, the api wouldnt be very useful. On the other hand, everyone having their own implementation of this very easy to add functionality, should be reason enough to add this. So everyone can finally use THE ONE ForEach, and not having to repeatedly writing new versions that are all the same.

      @yetanotherdex@yetanotherdex2 ай бұрын
    • @@yetanotherdex The idea is that you should not use a function at all, but the foreach statement, which is also very simple to write. That's the point. And just like LINQ, the foreach is based on IEnumerable as well. However, it is an opinion an a design choice, not a rule. It is idomatic in C# in this way. However in Rust, most things produce a value, there are no real statements. And in Rust they also have a foreach function indeed. Although even there the statement version is more popular. It would not surprise me if they actually added the function in C# that not many people will end up using it.

      @jongeduard@jongeduard2 ай бұрын
    • @@jongeduard ill be the one replacing thousands of lines of foreach statements with a single line of foreach function at the end of the linq statement. And I'll be happy because it just looks so much cleaner and thus easier to read. Maybe it's just me 😅

      @yetanotherdex@yetanotherdex2 ай бұрын
  • What improvements around LINQ do I want to see? Definitely unfreeze development of Linq Query syntax (from _ in _ select) and extend it for features like aggregation functions, ranges etc. A lot people say, that syntax is not their taste, but quite frequently their argument is, that it lacks those features and combination hybrid of method and query syntax is weird (it actually is), but I personally love that syntax and seeing it being "forgotten" sucks.

    @gabrielhalvonik192@gabrielhalvonik1922 ай бұрын
    • I often prefer query syntax for longer LINQ statements. It would be fantastic if Microsoft could integrate full SQL capabilities into LINQ's query syntax. 😎

      @seventymx@seventymx2 ай бұрын
  • Why wouldn't they add SQL syntax; then it'll GroupBy(word =>word).Count().Max() It kinda feels better

    @niezbo@niezbo2 ай бұрын
    • What would that be in SQL? Count what?

      @gunnarliljas8459@gunnarliljas84592 ай бұрын
  • What I really would like to have an Linq is an Or(params..), compatible with entity framework...

    @canabale@canabale2 ай бұрын
    • How would that syntax be?

      @gunnarliljas8459@gunnarliljas84592 ай бұрын
  • can c# be used for data science with such innovative data processing inbuild features? or should i use python ?

    @DeepakBhagat04@DeepakBhagat042 ай бұрын
  • Is there any method that let us write a join link query based on a like condition?

    @younesmedjtouh3550@younesmedjtouh35502 ай бұрын
  • I have only just started with .NET 8 and there is already a .NET 9 preview version. Jeez.

    @Grimlock1979@Grimlock19792 ай бұрын
  • Big fan of LINQ overall but honestly I find the aggregate and index ones kinda pointless. Aggregate is one that I honestly feel should be avoided in general due to its habit of obfuscating the code. More lines of code isn't always a bad thing if it better communicates intent. As for Index, the example its trying to fix is weird. Why would you use a foreach and a select for that? A standard for loop/For method will do that just fine as it is

    @lylerolleman1564@lylerolleman15642 ай бұрын
    • Using a standard loop requires you to predeclare a variable `var i = 0` beforehand and remember to increment in the loop (which you can easily get wrong if you e.g. have a continue in your loop or something). Therefore .Index() or .Select((x, i) => (x, i)) avoids these gotchas.

      @andrewmcclement4464@andrewmcclement44642 ай бұрын
    • @@andrewmcclement4464 for loops really don't have this problem. They are specifically structured to provide your initialization; conditional expression; increment.

      @lylerolleman1564@lylerolleman15642 ай бұрын
  • Min() returns int, MinBy() returns element; Max() returns int, MaxBy() returns element; Count() returns int, CountBy() returns IEnumerable. Looks inconsistent

    @nanvlad@nanvlad2 ай бұрын
    • On the other hand it kinda makes sense. Min, MinBy, Max and MaxBy all return the T of IEnumerable. As for CountBy(), personally I'd call it CountPer(), but I guess it matches GroupBy() as it is.

      @chris-pee@chris-pee2 ай бұрын
    • @@chris-pee Yeah. CountBy IS GroupBy followed by a Select. Almost a bit redundant.

      @gunnarliljas8459@gunnarliljas84592 ай бұрын
  • Not to nit pick, should have ' ' and ' ' in the spit chars for the split example 🙄

    @dand4485@dand44852 ай бұрын
    • And he should have used File.ReadLines, not ReadAllLines 🙄

      @NadjibBait@NadjibBait2 ай бұрын
    • @@NadjibBait Great point. Especially on a system where one of their founders said "Who would ever need more than 640Kb" ☺

      @dand4485@dand44852 ай бұрын
  • I wish we had the option to use a shorter lambda syntax. For example LINQ would be simpler if instead of: items.Where(i => i.Id == 1) you could just write: items.Where(Id == 1) I suppose there's the possibility of a conflict with a local variable, member field, method overload, parameter, etc. but if there's ambiguity, and you want the lambda to take precedence, couldn't that simply be resolved by using the full lambda syntax in those cases?

    @dansmif@dansmif2 ай бұрын
    • I don't like this idea. If lambda is not readable, you can extract method and reference it kind of this way - as for example items.Where(ItemIdEqualsOne).

      @radol@radol2 ай бұрын
    • I believe in Kotlin and, as of last year in F# as well, that's Where(_.Id == 1). Personally I like it.

      @chris-pee@chris-pee2 ай бұрын
    • @@chris-pee In Kotlin it would be items.filter { it.id == 1 }

      @vasiliychernov2123@vasiliychernov21232 ай бұрын
    • @@vasiliychernov2123 yep, my mistake

      @chris-pee@chris-pee2 ай бұрын
    • That's why they invented the query syntax: from p in people where p.Id == 1 select p That syntax also has some advantages over the lambda syntax, like easier joins, the "let" keyword, more natural grouping. But it's also not complete, so you may have to mix and match it with lambdas, or wrap it so you can do a ToList().

      @JoeEnos@JoeEnos2 ай бұрын
  • Hi Nick, I see that you are using Rider, for me Rider is very slow, specially when trying to debug, probably you can make a video about how to optimize Rider, tipis or share your settings? Thanks for all your videos

    @Bujinkan99@Bujinkan992 ай бұрын
    • Ryder is slow, even on fast machines. Nick plays screencast videos at double speed 😉😁

      @thomasschroter3802@thomasschroter38022 ай бұрын
  • But why, why no SortBy() ? Similar to OrderBy, but in place sorting.

    @siposz@siposz2 ай бұрын
    • SortBy implies modification of the original collection, which isn't the Linq way of doing things. Linq is based on functional concepts, and one of the core aspects of that is immutability. Linq methods should never directly modify the collections they're working with -- or any external state, really -- as a matter of convention. This is also part of why there's no .ForEach() method, I believe. Likewise, Linq chains produce IEnumerables and other generic interfaced collection abstractions, and you can't really do an in-place sort on the IEnumerable result of a Linq chain. Imaging doing .Select(...).SortBy(...) -- it just wouldn't make sense, because at that point in the chain, the connection with the original collection is already lost. In-place sort really only makes sense when performed directly upon the original collection, and generally speaking, collection types already have their own Sort methods that can perform sorting more intelligently as they have awareness of the underlying collection structure.

      @ChamiCh@ChamiCh2 ай бұрын
    • @@ChamiCh Yeah, yeah. I don't say, I need a LINQ method operating with IEnumerable, it's obviously not possible.

      @siposz@siposz2 ай бұрын
    • @@siposz if what you want is a method that sorts a list by a simple OrderBy-style selector rather than having to use .Compare() yourself, that's simple enough; here you go: public static void SortBy(this List list, Func keySelector) where TKey : IComparable => list.Sort((s1, s2) => keySelector(s1).CompareTo(keySelector(s2))); You could construct similar extensions for different collection types; I don't believe there's a common interface for .Sort() across different types.

      @ChamiCh@ChamiCh2 ай бұрын
  • For last one, wouldn't it just be easier to ensure IEnumerable is actually a list, so you can index directly?

    @klocugh12@klocugh122 ай бұрын
    • And if it isn't? Enumerables and enumerators do not imply that the items do exist beforehand. But they come in a certain order, hence they can have an index. This does not imply at all that you would be able to index the original source. But now you don't have to use a variable of your own if you want a numbered enumeration.

      @zoltanzorgo@zoltanzorgo2 ай бұрын
    • Isn't a list in memory w/a definite size?

      @adambickford8720@adambickford87202 ай бұрын
    • If you converted it to a List, all the lines (file) would be loaded in memory. Although in Nick's example it wouldn't matter since he's using File.ReadAllLines, which returns an array, not an IEnumerable (File.ReadLines would be the method to use).

      @NadjibBait@NadjibBait2 ай бұрын
  • So, they have taken a few, but not all, of the MoreLINQ extensions. Why not just take the whole thing instead of creating future build conflicts.

    @MilYanXo@MilYanXo2 ай бұрын
    • They are trying to take the most useful ones and leave out those which are less useful - there is a very high bar to getting into the standard library.

      @andrewmcclement4464@andrewmcclement44642 ай бұрын
  • But one thing is bugging me. All Linq methods are extensions. Why Microsoft have to make us wait until .Net 9 to make it available. Just publish a nugget package. All of the samples you've shown are methods that could be easily done now with the code that is already available (and I am sure most of us already have something similar created). Microsoft has a System.Linq Nuget package that haven't been updated since 2016 (it is in version 4.3.0 now). Maybe just release a version 8 with the new stuff and make it not compatible with the Net 9 framework so it has to be removed or upgraded when using the new runtime.

    @AndreViannaRJ@AndreViannaRJ2 ай бұрын
  • Hope LINQ query syntax gets more updates to add the missing features. - it's so useful and elegant! "var topRoles = (from user in Users group user by user.Role into g let requests = g.SelectMany(u => u.UserLog.FailedRequest.Concat(u.UserLog.SuccessFullTransactions)) let count = requests.Count() orderby count descending select g.Key.DisplayName).Take(3);" (from my analytics dashboard - most active roles)

    @seventymx@seventymx2 ай бұрын
  • Partition, Window… basically just everything in kotlin’s Iterable

    @Bliss467@Bliss4672 ай бұрын
  • That Index() method still looks weird.... Why would it return a tuple? Why would anyone understand that Index returns a tuple with the Index and value?

    @AlgoristHQ@AlgoristHQАй бұрын
  • C# dev team popping out new features every month just to avoid layoffs

    @steved2947@steved29472 ай бұрын
    • Lol, they have over 5000 issues backlog. If they will be laid off it won't be because of lack of work.

      @protox4@protox42 ай бұрын
  • .NET 8 was released in Nov. of 2023. How in the holy hell are we already talking about preview 2 of .NET 9 in early-mid February?

    @keyser456@keyser4562 ай бұрын
    • .NET features are very often already being considered for new versions before a previous version was even released. Heavily depends on if it should be part of a .NET version with how much time is left to implement and test.

      @fusedqyou@fusedqyou2 ай бұрын
    • How many times will this same type of comment happen? Development doesn’t stop once a version is released lol

      @metaltyphoon@metaltyphoon2 ай бұрын
    • There yearly releases at this point with the even number ones being LTS versions

      @a13w1@a13w12 ай бұрын
    • I hear you. It's always been like this. At least .NET is relatively stable.

      @ScrotoTBaggins@ScrotoTBaggins2 ай бұрын
    • @@metaltyphoon Well, unless you worked on the VB compiler team. (Too soon?)

      @alexclark6777@alexclark67772 ай бұрын
  • that is why i love .NET every year we get creat optimizations not like JAVA which is stuck since release xDD

    @Athurito@Athurito2 ай бұрын
  • "Lorem ipsum" is FAKE Latin. It is not Latin. It only looks like Latin. Not only that, but it does not mean anything. It is only placeholder text.

    @Flynnor@Flynnor2 ай бұрын
  • These ..by() extensions will be nice to replace this pattern. Groupby orderby firstordefault. The Linq group by just never feels intuitive to me.

    @63pufferfish@63pufferfish2 ай бұрын
  • I can imagine how slow the Index method is, because it looks like you are allocating a new tuple of index and string, each iteration. At this point i would just do a for loop instead.

    @sinan720@sinan7202 ай бұрын
  • First

    @dzllz@dzllz2 ай бұрын
    • You too fast

      @Felipe-mg1pw@Felipe-mg1pw2 ай бұрын
    • OrDefault

      @jackkendall6420@jackkendall64202 ай бұрын
    • Single

      @nickchapsas@nickchapsas2 ай бұрын
    • @@nickchapsas oof. low blow, nick lmao

      @ChamiCh@ChamiCh2 ай бұрын
    • @@nickchapsas thanks for responding!

      @dzllz@dzllz2 ай бұрын
  • Mmmmm lasagna

    @slowjocrow6451@slowjocrow64512 ай бұрын
  • i do not like linq MaxBy. if two results are tied for the max, you only get one back. it might be important to know if there was more than one value at the max. and if you're reading from a database, the order of the data will change over time so your expected results could change. i do not think i will ever use this method as a result. i would rather use morelinq maxima because at least it works the way i would expect which is anything with the maximum maxby value

    @bobskywalker8127@bobskywalker81272 ай бұрын
  • Why don't they implement all that into .net 8 or lets say .net 8.1. something

    @chintu2691994@chintu26919942 ай бұрын
  • 9 .net 8 isn’t in lts yet

    @psymon25@psymon252 ай бұрын
  • .net 9 ffs can we just slow down please

    @demarcorr@demarcorr2 ай бұрын
  • No weirder than any other. Maybe she used AI to write the lyrics?

    @bnm0312@bnm03122 ай бұрын
  • So C# basically copied the Javascript's higher order functions

    @DucaTech@DucaTech2 ай бұрын
  • The flub with the "' sed" shows why one should never split words with string splitting characters. Even the Regex Split with "'\W" is far better than the naive solution. Or depending on what you want better Regex.Split(phrase, @"(\W|')+") for English.

    @der.Schtefan@der.Schtefan2 ай бұрын
  • 📝 Summary of Key Points: 📌 The speaker introduces new link methods coming in .NET 9, acknowledging that link has faced criticism for its performance but believes the productivity gained outweighs any performance issues. 🧐 The first method shown is the "count" method, which calculates the count in a collection based on a specific property or value. 🚀 The second method shown is the "aggregate by" method, allowing for aggregation based on a key selector. 📌 The third method shown is the "index" method, a more concise way to achieve the same result as using a select statement with both the value and index. 📣 The speaker concludes by mentioning the possibility of more link methods being added in the future and encourages viewers to subscribe for updates. They also ask for viewers' thoughts on the new methods and any suggestions for future link methods. 💡 Additional Insights and Observations: 💬 "The productivity gained outweighs any performance issues." 🌐 The speaker encourages viewers to subscribe for more updates on new features. 📣 Concluding Remarks: The speaker introduces new link methods in .NET 9, addressing the criticism of link's performance by emphasizing the productivity gained. They demonstrate the "count," "aggregate by," and "index" methods with hands-on examples. The speaker concludes by expressing the possibility of more link methods in the future and encourages viewers to provide feedback and suggestions. Generated using TalkBud

    @abdelkaioumbouaicha@abdelkaioumbouaicha2 ай бұрын
  • Lorem ipsum isn't really Latin.. en.wikipedia.org/wiki/Lorem_ipsum

    @KeesAlderliesten@KeesAlderliesten2 ай бұрын
KZhead