Skip to content
| Marketplace
Sign in
Visual Studio>Tools>EnumToStringAnalyzer
EnumToStringAnalyzer

EnumToStringAnalyzer

Preview

Ron Dembo

|
79 installs
| (0) | Free
This extension warns about Enum.ToString() usage and converts to SlimCommon.ConvertEnum.ToString() more efficient implementation
Download

Description

This extension warns about Enum.ToString() usage in the visual studio error list window and converts to SlimCommon.ConvertEnum.ToString() more efficient implementation

alt text

For example, the following line: string s = TestEnum.Value.ToString();

Will be converted into: string s = TestEnum.Value.ToString<TestEnum>();

As well as inside string interpolation, the following lines:

TestEnum a = TestEnum.Value;
string s = $"{TestEnum.Value}, {a}";

Will be converted into:

TestEnum a = TestEnum.Value;
string s = $"{TestEnum.Value.ToString<TestEnum>()}, {a.ToString<TestEnum>()}";

Full project / solution scanning

In order to scan all occurrences in your project / solution you can click in visual studio Analyze tab -> Run code analysis -> On Solution / Project.

Attention:

This auto fix doesn't add Microsoft.WCD.SevilleCloud.SlimCommon as a reference to the project or to the usings list - must be done manually.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft