New answers tagged


You don't care about null references? IMO you create an object in order just to do something, that is more suitable for the concept of extensions: public static class StringExtensions { public static byte[] ToUTF8Bytes(this string text) { return Encoding.UTF8.GetBytes(text); } public static string ToUTF8(this byte[] bytes) { ...

Top 50 recent answers are included