I am getting the following error: 'System.Text.Encoding' does not contain a definition for 'Default' when I am trying to use Default method of Encoding through
var str2 = System.Text.Encoding.Default.GetString(bytearray);
Through,MSDN I have learn there exist Default method in System.Text.Encoding, then why I am getting this error? MSDN refrence for Default is here:enter link description here
please help me out.
Encoding.Default
refers to the system-default ANSI code-page in regular windows, inherited from the depths of time. Even on regular windows, it is not a good idea to use Encoding.Default
. No such concept exists on windows phone, so : use the correct encoding; which usually means .UTF8
.
Windows phone does not use the same .NET framework as windows, although they are very similar and much code will compile identically.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With