Yes, there are certainly,
certainly neater ways to do this than using reflection to get methods on
BitConverter
and using
Convert
, but if you want advice on how to improve working code, and you can make your concerns specific (rather than "make it look better somehow"),
Code Review is a better venue. (If it
doesn't work right now, it's not clear in what way it doesn't work.) —
Jeroen Mostert 11 secs ago