MailMessage.BodyEncoding 属性

定义

获取或设置电子邮件正文的编码类型。 建议使用的替代项:System.Net.Mail

public:
 property System::Text::Encoding ^ BodyEncoding { System::Text::Encoding ^ get(); void set(System::Text::Encoding ^ value); };
public System.Text.Encoding BodyEncoding { get; set; }
member this.BodyEncoding : System.Text.Encoding with get, set
Public Property BodyEncoding As Encoding

属性值

值之 Encoding 一,指示电子邮件正文的编码类型。

示例

MailMessage MyMessage = new MailMessage();
MyMessage.BodyEncoding = Encoding.ASCII;
Dim MyMessage As MailMessage = New MailMessage()
MyMessage.BodyEncoding = Encoding.ASCII

适用于