Micro Optimization Samples List.TrimExess() Benchmark for vs foreach vs ForEach() Benchmark Reflection/Class vs NonReflection/Struct Benchmark Normal flow vs Throw Exception Benchmark string Replace vs ToCharArray vs Span