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 1045 dni, 20 godzin, 49 minut temu Piotr Stapp 63 pokaż kod licznika zwiń

Wczytywanie artykułów...

Najaktywniejsi w tym miesiącu