TryDetectUnicodeEncoding Method
Definition
- Namespace
- Cuemon.Extensions
- Assemblies
- Cuemon.Extensions.Core.dll
TryDetectUnicodeEncoding(byte[], out Encoding)
public static bool TryDetectUnicodeEncoding(this byte[] bytes, out Encoding result)
Parameters
bytesbyte[]The byte array to extend.
resultEncodingWhen this method returns, it contains the Unicode Encoding value equivalent to the encoding contained in
bytes, if the conversion succeeded, or a null reference (Nothing in Visual Basic) if the conversion failed. The conversion fails if thebytesparameter is null, or does not contain a Unicode representation of an Encoding.
Returns
- bool
trueif thebytesparameter was converted successfully; otherwise,false.