Awesome Lists

EnumFastToStringDotNet

by Spinnernicholas

C#pushed over 4 years ago

This is a Visual Studio C# source generator for automatically generating enum extension methods that implement a switch expression based ToString method. Why? The default enum ToString method implements a binary search which is great for large lists but becomes time and memory inefficient for a just a few items when compared to a switch expression.

AI summary

Enum converter

Automatically generates a faster enum to string conversion method

stars
31
forks
2
watching
3
awesome list
1
View on GitHub

Embed the badge

Show how many awesome lists link to your project. The count updates automatically.

Awesome Lists badge
Markdown
[![Awesome Lists Badge](https://awesome.facts.dev/shield/Spinnernicholas/EnumFastToStringDotNet/links.svg)](https://awesome.facts.dev/awesome/Spinnernicholas/EnumFastToStringDotNet)
HTML
<a href="https://awesome.facts.dev/awesome/Spinnernicholas/EnumFastToStringDotNet"><img src="https://awesome.facts.dev/shield/Spinnernicholas/EnumFastToStringDotNet/links.svg" alt="Awesome Lists Badge" /></a>
Image URL
https://awesome.facts.dev/shield/Spinnernicholas/EnumFastToStringDotNet/links.svg

Add a GitHub project

Missing a project or an awesome list? Paste its GitHub URL and we fetch it right away.