111,094
社区成员




//
// 摘要:
// Returns the encoding associated with the specified code page name.
//
// 参数:
// name:
// The code page name of the preferred encoding. Any value returned by the System.Text.Encoding.WebName
// property is valid. Possible values are listed in the Name column of the table
// that appears in the System.Text.Encoding class topic.
//
// 返回结果:
// The encoding associated with the specified code page.
//
// 异常:
// T:System.ArgumentException:
// name is not a valid code page name. -or- The code page indicated by name is not
// supported by the underlying platform.
public static Encoding GetEncoding(string name)
{
Encoding ret=null;
switch(name)
{ //......
case "UTF-8":
ret=UTF8;
break;
//...
}
return ret;
}
只有运行效率上的微妙区别,可能在根据name返回Encoding 上面,其他地方没有区别,就是一个东西