Dave Zych
  • Home
  • About
  • Contact
  • Privacy

tostring

A collection of 2 posts
C#

If you're using enum.ToString() that often, you're doing it wrong

Daniel Wertheim measured the performance of enum.ToString and found it to be 400x slower than using a comparable class with const’s. [http://danielwertheim.se/2014/09/30/c-someenum-tostring-measured-to-be-400x-slower/] That’s a massive difference, and something that, in theory, might make you think otherwise about using an enum. But
Oct 1, 2014 1 min read
C#

Fun times with string.join in C#

I had an interesting issue the other day at work regarding string.Join [http://msdn.microsoft.com/en-us/library/57a79xd0.aspx]. I had overridden ToString in one of my classes to easily output values from the object, and this new ToString implementation was utilizing string.Join: class Data { public string
Aug 12, 2013 3 min read
Page 1 of 1
Dave Zych © 2025
  • Data & privacy
  • Contact
Powered by Ghost