Gets or sets the friendly name contained in this MailAddress object.
Syntax
| Visual Basic (Declaration) | |
|---|
Public Property Friendly As String |
| Visual Basic (Usage) | Copy Code |
|---|
Dim instance As MailAddress
Dim value As String
instance.Friendly = value
value = instance.Friendly |
| C# | |
|---|
public string Friendly {get; set;} |
| Managed Extensions for C++ | |
|---|
public: __property string* get_Friendly();
public: __property void set_Friendly(
string* value
); |
Property Value
The friendly name for the user receiving this email.
Example
The following example demonstrates the properties of a MailAddress object.
| Visual Basic | Copy Code |
|---|
' Be sure to import the namespace by putting "Imports Dart.PowerTCP.Mail"
' at the top of your class.
' Create a new MailAddress, supplying the address and friendly name.
Dim ma As New MailAddress("""Fake Name"" test@dart.com")
Debug.WriteLine("Network formatted address: " + ma.Address)
Debug.WriteLine("Domain of the address: " + ma.Domain)
Debug.WriteLine("Friendly name: " + ma.Friendly)
Debug.WriteLine("User name: " + ma.User)
Debug.WriteLine("All address data: " + ma.ToString());
' Output
' --------------------------------
' Network formatted address: <test@dart.com>
' Domain of the address: dart.com
' Friendly name: Fake Name
' User name: test
' All address data: "Fake Name" <test@dart.com> |
| C# | Copy Code |
|---|
// Be sure to import the namespace by putting "using Dart.PowerTCP.Mail;"
// at the top of your class.
// Create a new MailAddress, supplying the address and friendly name.
MailAddress ma = new MailAddress("\"Fake Name\" test@dart.com");
Debug.WriteLine("Network formatted address: " + ma.Address);
Debug.WriteLine("Domain of the address: " + ma.Domain);
Debug.WriteLine("Friendly name: " + ma.Friendly);
Debug.WriteLine("User name: " + ma.User);
Debug.WriteLine("All address data: " + ma.ToString())
// Output
// --------------------------------
// Network formatted address: <test@dart.com>
// Domain of the address: dart.com
// Friendly name: Fake Name
// User name: test
// All address data: "Fake Name" <test@dart.com> |
Remarks
Requirements
Target Platforms: Microsoft .NET Framework 2.0
See Also