Skip to content

Use span-based string.Concat #33777

@terrajobst

Description

@terrajobst

The rule should flag instances of a pattern like str1 + str2.Substring(...) + str3 or string.Concat(str1, str2.Substring(...), str3) and instead switch to using the span-based string.Concat(str1, str2.AsSpan(...), str3).

Category: Performance
Suggested severity: Info

Metadata

Metadata

Assignees

Labels

api-approvedAPI was approved in API review, it can be implementedarea-System.Runtimecode-analyzerMarks an issue that suggests a Roslyn analyzercode-fixerMarks an issue that suggests a Roslyn code fixer

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions