Breyta

Deila með


SyndicationPerson.Email Property

Definition

Gets or sets the email address of the SyndicationPerson.

public:
 property System::String ^ Email { System::String ^ get(); void set(System::String ^ value); };
public string Email { get; set; }
member this.Email : string with get, set
Public Property Email As String

Property Value

The email address of the person.

Examples

The following code shows how to set the email address of a SyndicationPerson instance.

SyndicationPerson sp = new SyndicationPerson();
sp.Email = "jesper@contoso.com";
Dim sp As New SyndicationPerson()
sp.Email = "jesper@contoso.com"

The following XML shows how the Email is serialized for Atom 1.0.

<author>
  <name>Jesper Aaberg</name>
  <uri>http://Jesper/Aaberg</uri>
  <email>Jesper.Aaberg@contoso.com</email>
</author>
<contributor>
  <name>Lene Aalling</name>
  <uri>http://Lene/Aaling</uri>
  <email>Lene.Aaling@contoso.com</email>
</contributor>

The following XML shows how the Email is serialized for RSS 2.0.

<a10:author>
  <a10:name>Lene Aalling</a10:name>
  <a10:uri>http://Lene/Aalling</a10:uri>
  <a10:email>Lene.Aalling@contoso.com</a10:email>
</a10:author>
  <a10:contributor>
  <a10:name>Jesper Aaberg</a10:name>
  <a10:uri>http://Jesper/Aaberg</a10:uri>
  <a10:email>Jesper.Aaberg@contoso.com</a10:email>
</a10:contributor>

Remarks

When serialized to Atom 1.0, the SyndicationPerson property is written as an <email> element. The <email> element appears within an <author> or <contributor> element, which depends upon which collection (authors or contributors) the SyndicationPerson is added to.

When serialized to RSS 2.0, this value is written as an <a10:email> element. The <a10:email> element appears within a <managingEditor>, <a10:author>, or <a10:contributor> element. If only one SyndicationPerson is added to the authors collection, the <email> element is written within the <managingEditor> element. If more than one SyndicationPerson is added to the authors collection, the <email> element is written within an <a10:author> element. If the SyndicationPerson is added to the contributors collection, the <email> element is written within an <a10:contributor> element.

Applies to