Params Collections - The First NEW C# 13 Feature

Поделиться
HTML-код
  • Опубликовано: 7 сен 2024

Комментарии • 8

  • @ClaudioBernasconi
    @ClaudioBernasconi  7 месяцев назад +1

    Do you like this first new C# 13 feature? Will you use it in your code?

  • @10Totti
    @10Totti 7 месяцев назад

    Nice tutorial!

  • @janniksam1504
    @janniksam1504 7 месяцев назад

    What about IReadOnlyCollection? Will this also work?

    • @ClaudioBernasconi
      @ClaudioBernasconi  7 месяцев назад +2

      Great question! Yes, IReadOnlyList and IReadOnlyCollection work with the params keyword in the current preview implementation.

  • @NikorouKitsunerou
    @NikorouKitsunerou 7 месяцев назад

    For me, this feature seems a bit like std::optional yet also pythonic. Not sure how I feel about it going around method signatures. Sure some people will want to use it.

    • @ClaudioBernasconi
      @ClaudioBernasconi  7 месяцев назад +1

      Like many other modern C# features it's borrowed from other languages. Some developers will use it and others won't. However, I love being educated about what's new so that I know what it is when I encounter it in the real world.

    • @NikorouKitsunerou
      @NikorouKitsunerou 7 месяцев назад

      @@ClaudioBernasconi I really appreciated the time you took to dive into the features. I quite like the C# language.