This product is not supported for your selected Datadog site. ().
Cette page n'est pas encore disponible en français, sa traduction est en cours. Si vous avez des questions ou des retours sur notre projet de traduction actuel, n'hésitez pas à nous contacter.
Metadata
ID:csharp-best-practices/redundant-tochararray
Language: C#
Severity: Warning
Category: Best Practices
Description
When using a for each statement to iterate over a string’s characters, using ToCharArray() is redundant and unnecessary, as the string type has indexer that allows access to each char.