SyndicationPerson.Name Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets the name of the SyndicationPerson.
public:
property System::String ^ Name { System::String ^ get(); void set(System::String ^ value); };
public string Name { get; set; }
member this.Name : string with get, set
Public Property Name As String
Property Value
The name of the person.
Examples
The following code shows how to set the name of a SyndicationPerson.
SyndicationPerson sp = new SyndicationPerson();
sp.Name = "Jesper Aaberg";
Dim sp As New SyndicationPerson()
sp.Name = "Jesper Aaberg"
The following XML shows how the Name 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 Name 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 Name property is written as a <name>
element. The <name>
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, the Name property is written as an <a10:name>
element. The <a10:name>
element appears within a <managingEditor>
, <a10:author>
, or <a10:contributor>
element. If only one SyndicationPerson is added to the authors collection, the <a10:name>
element is written within the <managingEditor>
element. If more than one SyndicationPerson is added to the authors collection, the <a10:name>
element is written within the <a10:author>
element. If the SyndicationPerson is added to the contributors collection, the <a10:name>
element is written within the <a10:contributor>
element.
Applies to
.NET