查找字符串是否包含BOM(编码已知)

时间:2016-01-19 12:40:53

标签: c#-4.0 encoding

我的代码中引用了第三方.dll返回的字符串。 编码是已知的,但我想知道该字符串是否包含Preamble / BOM。

        string text = ThirdPartyDLL.GetText();
        string encoding = ThirdPartyDLL.GetEncodingName();

        bool hasPreamble = ?

0 个答案:

没有答案
相关问题