7 posts about SpanT by 6 contributors.
Know SpanT? Share what you know with developers who are learning it.
Explore C# memory management, from stack vs heap to structs and contiguous memory. Learn how Span<T> enables efficient slicing without allocations, optimizing performance and reducing GC overhead in modern .NET apps.
Learn how to optimize memory access in C# .NET using CollectionsMarshal.AsSpan for high-performance scenarios. This API provides direct access to collection memory, reducing allocations and improving efficiency.
Span<T> and Memory<T> in C# provide efficient ways to handle memory without allocations, improving performance in .NET applications. Span<T> is stack-allocated for fast access, while Memory<T> supports heap-based scenarios.
Often in application we come scenarios where we need to perform string manipulation operations. In such cases using string type take up huge memory as it is immutable. Instead Span can be used, which saves memory
In C#, the AsMemory method is a powerful tool for creating Memory<T> instances from arrays, array segments, or strings. It is part of the System.Memory namespace, which offers types designed to work with memory efficiently and safely without unnecessary heap allocations.
Learn C# memory optimization techniques including garbage collection tuning, Span and Memory, unsafe pointers, stack allocation, finalizers, and object pooling.
In this article, we will see use of Span<T> to working with array.
DevSocialUpcoming · 3rd editionAI Agents ConferenceNov 23–27, 2026Live onlineMembers only16days leftRegisterPublish an article in this category and earn +1,000 SHARP when it is approved.
Write an article