Converting an enum value to a string using the ToString() method is expensive. In general, the performance impact is negligible. But when you call the ToString method thousands of times per second, saving a few milliseconds is important.

Tagi: performance
Źródło: www.meziantou.net
Dziel się z innymi:
Caching Enum.ToString to improve performance - Meziantou's blog

Inne 1032 dni, 2 godziny, 24 minuty temu Piotr Stapp 63 pokaż kod licznika zwiń

Wczytywanie artykułów...

Najaktywniejsi w tym miesiącu