Is there any combination of a byte[]
that will cause this to fail, other than byteArray being null?
var myString = Convert.ToBase64String(byteArray);
I'm thinking something like... starting or ending with byte zero (null?). An Empty byte[]
? A very large byte[]
? Some sequence of bytes that wouldn't make sense in Base64? My issue is the unknown unknowns.
As stated on the docs: no.
Exception
-wise theConvert.ToBase64String
overload you are using only throwsArgumentNullException
(when its parameterinArray
is null).