What is Span in C# and why you should be using it

preview_player
Показать описание

Hello everybody I'm Nick and in this video I am going to talk about Span of T in C#. Span was introduced in C# and .NET alongside a series of optimisations all the way back in .NET 2.1 and it has come to my attention that it is really confusing to understand if you just read the documentation for it. In this video I will break it down for you and help you understand exactly what it is, how it works and how you can use it in your applications today!

Don't forget to comment, like and subscribe :)

Social Media:

#csharp #dotnet #span
Рекомендации по теме
Комментарии
Автор

Hello everybody. As some people have already pointed out, after 13:50, when I'm returning a ReadOnlySpan, the ToString() on line 21 should be removed. I didn't notice because of the implicit operator. If you leave the ToString() in then you still allocate the string you return.
- Keep coding

nickchapsas
Автор

this is the first explanation of Span that made sense to me.
thank you!!

kodikodi
Автор

If int.Parse did not need to input string but span why Console.WriteLine need it?

mabakay
Автор

Great video as always. Is this only ever useful for strings? Thanks

Ayomikun
Автор

shouldn't you remove the tostring() from the yearastext? now it make's no sense.

SaveTheHedgehog
Автор

Wait wait wait wait wait. Hold up. You're telling me that I can return multiple values from methods in C#?

richardrisner
join shbcf.ru