SyndicationPerson.Name Property
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
The name of the person.
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>
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.
Produit | Versions |
---|---|
.NET | 8 (package-provided), 9 (package-provided) |
.NET Framework | 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7 (package-provided), 4.7, 4.7.1 (package-provided), 4.7.1, 4.7.2 (package-provided), 4.7.2, 4.8 (package-provided), 4.8, 4.8.1 |
.NET Standard | 2.0 (package-provided) |
Commentaires sur .NET
.NET est un projet open source. Sélectionnez un lien pour fournir des commentaires :