Error:The name 'Encoding' does not exist in the current context 解决办法

Error:The name Encoding does not exist in the current context 解决方法项目中包含 :using System.Text

Error:The name 'Encoding' does not exist in the current context 解决方法

项目中包含 :

using System.Text;

即可。