.NET 7 Update: List Patterns in 10 Minutes or Less

Поділитися
Вставка
  • Опубліковано 15 лис 2024

КОМЕНТАРІ • 88

  • @torrvic1156
    @torrvic1156 Рік тому +2

    You videos are so exciting Mr. Corey! Never ever I’ve heard about this zero or more (..) and discard (_) operators. Those are really handy. Thank you so much!

  • @vincentotieno9197
    @vincentotieno9197 Рік тому +6

    This is great development in C#. No more doing convoluted loops just to get something out of an array.

  • @HimalayanNavigator
    @HimalayanNavigator Рік тому +1

    Thanks Tim, your this short video series also really helping quick on important topics..🙏

  • @georget10i
    @georget10i Рік тому

    This is really nice! The hard part is remembering that you have all these tools at your disposal. It would be amazing if C# had a feature where it gives you hints to refactor your code using new C# features. There was an extension for VS called "Sharpen" by ironcev which did exactly that, suggested improvements by using new C# features. Unfortunately is it not being updated anymore.

    • @IAmTimCorey
      @IAmTimCorey  Рік тому +1

      The quick actions and refactoring often does this now.

  • @Salted_Potato
    @Salted_Potato Рік тому +6

    Great video, concise and straight to the point!

  • @crogon-yt
    @crogon-yt Рік тому +2

    First thing I thought 2 minutes in: "OMG this is so good!" and then it just getting better!
    EDIT: Although, what might be EVEN mo' better would be a language integration of regex's

    • @IAmTimCorey
      @IAmTimCorey  Рік тому

      I'm glad you are going to get a lot of use out of it.

  • @programmingeveryday1976
    @programmingeveryday1976 Рік тому +2

    Oh my heck this is so awesome. Literally, was just writing a validator earlier this week and moving to this is going to help so much. thank you thank you thank you for letting me know about this.
    Now I just need to find time to re-factor my code!

    • @IAmTimCorey
      @IAmTimCorey  Рік тому

      I am glad it will be so helpful.

    • @programmingeveryday1976
      @programmingeveryday1976 Рік тому

      @@IAmTimCorey one thing that I found kind of wonky is that if you do an else if you have to declare different names otherwise it doesn't work.
      this works:
      if(list is[var name, var id])
      {//do work;}
      else if (list is [var _name, var _id, var domain])
      {//do other work}
      else{//do some other thing}
      this will not:
      if(list is[var name, var id])
      {//do work;}
      else if (list is [var name, var id, var domain])
      {//do other work}
      else{//do some other thing}

    • @programmingeveryday1976
      @programmingeveryday1976 Рік тому

      Re-factoring in the style is pretty straightforward otherwise.

  • @pavfrang
    @pavfrang Рік тому +1

    Thanks Tim for the great video! This feature is really handy! I am dealing with various text files which are measurement files from devices.

  • @JohnMyren
    @JohnMyren Рік тому +1

    Hi Tim, great video!
    In the code you have a "separator:" in front of the split character parameter.
    Is this a VS Extension or a VS option configuration?
    If it is an extension, what extension is it?

    • @IAmTimCorey
      @IAmTimCorey  Рік тому +2

      That's a newer feature of Visual Studio. It is in the Tools->Options->Text Editor->C#->Advanced under the "Inline Hints" section. You need to check the "Display inline parameter name hints" to turn it on.

  • @Sixthflyer
    @Sixthflyer Рік тому

    Thanks Tim, i can use this right now in my actual project

  • @danieldejager1847
    @danieldejager1847 Рік тому

    quick short and sharp mate. thank you.

  • @RayLinderdotcom
    @RayLinderdotcom Рік тому

    .. just blew my mind! 6:35

  • @igorilyichyov6414
    @igorilyichyov6414 Рік тому

    Thanks for the great explanation!

  • @personalgamedevyt9830
    @personalgamedevyt9830 Рік тому +1

    This is really cool! Thank you for the concise lesson!

  • @DrGaurangGupta
    @DrGaurangGupta Рік тому +1

    Since you covered Bootstrap (which is all I’ve ever used) could you also cover Material design. Even just an intro and brief differences between both would be great.
    One difference I noticed is Bootstrap has very limited colour palette as compared to Material

    • @IAmTimCorey
      @IAmTimCorey  Рік тому

      Thanks for the suggestion. Please add it to the list on the suggestion site so others can vote on it as well: suggestions.iamtimcorey.com/
      As for the concept that Bootstrap has a limited color palette, I don't think that's really true. That might have been true at one point, but not anymore. For example, for every color (primary, success, warning, danger, dark, etc.) there is a range of 9 levels of that color. Plus, the colors provided by Bootstrap are just there as starter values. They fully intend for you to use your brand colors. I show off how to change their colors over to be your brand colors in my course. It is quite easy and it still generates the levels of color for my brand colors. Also, you can easily add more colors to the list if you want.
      So out of the box, they provide 99 color variations based upon 11 color options. They then use a subset for their theme, but all of these colors are available for you to use. That's a lot.

  • @kevinison3740
    @kevinison3740 Рік тому

    Really like these videos, thank you!

  • @sylviogiraldes
    @sylviogiraldes Рік тому

    Hmmm This has the potential of transforming a difficult task into a simple one. Tks Tim

  • @Norman_Fleming
    @Norman_Fleming Рік тому

    Very informative and clear. I would have expected the validation part would take regular expressions.

  • @marmo2023
    @marmo2023 Рік тому

    Thanks for the video, it looks very useful.

  • @AmMa-vj4gq
    @AmMa-vj4gq Рік тому

    Hello Tim, I love your videos, is there a way to get only the nth element, for example :
    I want the "Hello " from "1,Tim,Corey,test1,tes2,test3,Hello,World"
    without having to write [ .. , var BeforeLast, var Last]

    • @IAmTimCorey
      @IAmTimCorey  Рік тому

      I'm not sure what you are trying to do that your solution doesn't address. You can use the underscore to not include the Last variable, but otherwise, that is the solution that would work best for your given scenario.

  • @Moosa_Says
    @Moosa_Says Рік тому

    Awesome feature!!

  • @pjn2001
    @pjn2001 Рік тому

    Interesting, this could have saved me a ton of work back in the day.
    On an unrelated note, where can I report broken links on the iamtimcorey website?

    • @IAmTimCorey
      @IAmTimCorey  Рік тому +1

      I have a GitHub repo for site issues on any of my sites. You can submit an issue here: github.com/IAmTimCorey/SiteIssues
      I appreciate it.

  •  Рік тому

    My first tought was it's something that Perl has done many years ago. But still a good feature!

  • @AhmedSuror
    @AhmedSuror Рік тому

    Please, how do you make function parameter name visible in grey background box?

    • @IAmTimCorey
      @IAmTimCorey  Рік тому +3

      That's a newer feature of Visual Studio. It is in the Tools->Options->Text Editor->C#->Advanced under the "Inline Hints" section. You need to check the "Display inline parameter name hints" to turn it on.

    • @AhmedSuror
      @AhmedSuror Рік тому

      @@IAmTimCorey Thanks a lot, I was trying to figure it out for a long time.

  • @ziaullahhassan3162
    @ziaullahhassan3162 Рік тому

    Great Video, Thank You

  • @NathanHedglin
    @NathanHedglin Рік тому

    Oh nice! Thanks!

  • @88spaces
    @88spaces Рік тому

    Thanks, Tim. This is very helpful. Please continue to post these kinds of videos.

  • @sonnguyenhuu8903
    @sonnguyenhuu8903 Рік тому

    Thank you very much

  • @EvgeniyYatsenko
    @EvgeniyYatsenko Рік тому

    great stuff!

  • @faridjafri5385
    @faridjafri5385 Рік тому

    Very useful info...and easy to understand..thanks for sharing..💞

  • @barsgurbuz1717
    @barsgurbuz1717 Рік тому

    Awesome, thanks for info

  • @raghavgupta1799
    @raghavgupta1799 Рік тому

    Does it offer something different from what we get from Regular Expression?

    • @IAmTimCorey
      @IAmTimCorey  Рік тому +1

      They are two different things. This allows us to quickly access values out of a list. It isn't about filtering the list.

  • @ashimov1970
    @ashimov1970 Рік тому

    Does all of the above work in case an array/list items are all objects?

  • @tawhidurrahman2780
    @tawhidurrahman2780 Рік тому

    It's very much like the SQL like operator.

  • @jonbakari1330
    @jonbakari1330 Рік тому

    really usefully for me, thanks

  • @paulegan3783
    @paulegan3783 Рік тому

    Thanks!

  • @barry1048
    @barry1048 Рік тому

    That's pretty cool stuff!

  • @ivandrofly
    @ivandrofly Рік тому

    Thanks

  • @ahmedkeskin
    @ahmedkeskin Рік тому

    Thank you :)

  • @girornsveinsson7970
    @girornsveinsson7970 Рік тому

    Nice - thank you very much. If you would like to use a nice Nuget package for this task and write less code yourself, CSVHelper is pretty good too.

  • @BloodHaZaRd666
    @BloodHaZaRd666 Рік тому

    So I guess this wont be affordable using lists !! ?

    • @IAmTimCorey
      @IAmTimCorey  Рік тому +1

      I am not sure what you mean. Do you mean that Lists won't be performant? Because that's not true. This is very performant.

  • @ekabudi4051
    @ekabudi4051 Рік тому

    looks like rest pattern ecmascript

  • @nikolaymyatenko
    @nikolaymyatenko Рік тому

    Great video, thanks!