我在安裝Net Framework 4.5的Windows 8中使用Microsoft Visual Studio 2012。
我似乎無法在UTF8Encoding類中找到getString(Byte [])方法。
由於在msdn documentation中提供了兩種方法,所以我不確定我缺少什麼。
的方法:GetString的在UTF8Encoding類
我的微軟C#代碼:C#UTF8Encoding getString(Byte [])方法未出現
using System.Text;
// the code which I use the GetString method
// characters is a byte array
UTF8Encoding utfEncode= new UTF8Encoding();
string encodedStr= utfEncode.GetString(characters, 0, characters.Length); //this method is available to me
string encodedStr= utfEncode.GetString(characters); // the error message was that no such overloading method is found
什麼類型的人物對象? –
正在做XNA或便攜式應用程序?如果那麼只有第一種方法可用 – Damith
你可以用utfEncode.GetString編譯你的代碼嗎? – Adamy