Harmful collection transformations. Part 1: string to array of chars
An array - the simplest collection. It's just a memory block with elements of one type. Arrays are often used when we need to iterate a collection, to search elements or transform them. C# and .net evolved, many new collections were introduced, interfaces allowed to create generalized algorithms, LINQ simplified the work of programmers, but we continue to use arrays in inappropriate places and perform excess and sometimes harmful transformations. This post begins a series about collections, their features, performance and design. All posts will contain benchmarks, code examples, my opinion and recommendations.
I want to start with a string
, some specific collection of .net.
Csharp (18)
.net (18)
MSSQL (6)
TSQL (5)
LINQ (5)
performance (5)
benchmark (5)
patterns (3)
OPTIMIZATION (2)
collections (2)
stackoverflow (2)
retry (2)
circuit breaker (2)
list (1)
roslyn (1)
analyzer (1)
string (1)
NDepend (1)
asp.net (1)
specification (1)
repository (1)
entityframework (1)
EF (1)
xml (1)
soap (1)
CancellationToken (1)
Timer (1)
debug (1)
properties (1)
IEnumerable (1)
foreach (1)