MailAddress.TryCreate メソッド
定義
オーバーロード
TryCreate(String, MailAddress) |
新しい MailAddress を作成します。Creates a new MailAddress. オブジェクトを作成できない場合でも、例外はスローされません。Does not throw an exception if the object cannot be created. |
TryCreate(String, String, MailAddress) |
新規の MailAddress を作成します。Create a new MailAddress. オブジェクトを作成できない場合でも、例外はスローされません。Does not throw an exception if the object cannot be created. |
TryCreate(String, String, Encoding, MailAddress) |
新規の MailAddress を作成します。Create a new MailAddress. オブジェクトを作成できない場合でも、例外はスローされません。Does not throw an exception if the object cannot be created. |
TryCreate(String, MailAddress)
新しい MailAddress を作成します。Creates a new MailAddress. オブジェクトを作成できない場合でも、例外はスローされません。Does not throw an exception if the object cannot be created.
public:
static bool TryCreate(System::String ^ address, [Runtime::InteropServices::Out] System::Net::Mail::MailAddress ^ % result);
public static bool TryCreate (string address, out System.Net.Mail.MailAddress? result);
static member TryCreate : string * MailAddress -> bool
Public Shared Function TryCreate (address As String, ByRef result As MailAddress) As Boolean
パラメーター
- address
- String
メール アドレス。An email address.
- result
- MailAddress
このメソッドから戻った時点で、解析が成功した場合はメール アドレス オブジェクトが格納されています。When this method returns, contains the email address object if parsing succeeded.
戻り値
MailAddress が正常に作成された場合は true
。それ以外の場合は false
。true
if the MailAddress was successfully created; otherwise, false
.
適用対象
TryCreate(String, String, MailAddress)
新規の MailAddress を作成します。Create a new MailAddress. オブジェクトを作成できない場合でも、例外はスローされません。Does not throw an exception if the object cannot be created.
public:
static bool TryCreate(System::String ^ address, System::String ^ displayName, [Runtime::InteropServices::Out] System::Net::Mail::MailAddress ^ % result);
public static bool TryCreate (string address, string? displayName, out System.Net.Mail.MailAddress? result);
static member TryCreate : string * string * MailAddress -> bool
Public Shared Function TryCreate (address As String, displayName As String, ByRef result As MailAddress) As Boolean
パラメーター
- address
- String
メール アドレス。An email address.
- displayName
- String
アドレスに関連付けられている表示名。The display name associated with the address. このパラメーターは、null
に設定できます。This parameter can be null
.
- result
- MailAddress
このメソッドから戻った時点で、解析が成功した場合はメール アドレス オブジェクトが格納されています。When this method returns, contains the email address object if parsing succeeded.
戻り値
MailAddress が正常に作成された場合は true
。それ以外の場合は false
。true
if the MailAddress was successfully created; otherwise, false
.
適用対象
TryCreate(String, String, Encoding, MailAddress)
新規の MailAddress を作成します。Create a new MailAddress. オブジェクトを作成できない場合でも、例外はスローされません。Does not throw an exception if the object cannot be created.
public:
static bool TryCreate(System::String ^ address, System::String ^ displayName, System::Text::Encoding ^ displayNameEncoding, [Runtime::InteropServices::Out] System::Net::Mail::MailAddress ^ % result);
public static bool TryCreate (string address, string? displayName, System.Text.Encoding? displayNameEncoding, out System.Net.Mail.MailAddress? result);
static member TryCreate : string * string * System.Text.Encoding * MailAddress -> bool
Public Shared Function TryCreate (address As String, displayName As String, displayNameEncoding As Encoding, ByRef result As MailAddress) As Boolean
パラメーター
- address
- String
メール アドレス。An email address.
- displayName
- String
アドレスに関連付けられている表示名。The display name associated with address. このパラメーターは、null
に設定できます。This parameter can be null
.
- displayNameEncoding
- Encoding
displayName
に使用される文字セットを定義するエンコード。The encoding that defines the character set used for displayName
.
- result
- MailAddress
このメソッドから戻った時点で、解析が成功した場合はメール アドレス オブジェクトが格納されています。When this method returns, contains the email address object if parsing succeeded.
戻り値
MailAddress が正常に作成された場合は true
。それ以外の場合は false
。true
if the MailAddress was successfully created; otherwise, false
.