SyndicationLink.CreateAlternateLink Method
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.
Creates a new SyndicationLink object.
Overloads
CreateAlternateLink(Uri) |
Creates a new SyndicationLink object with the specified Uri. |
CreateAlternateLink(Uri, String) |
Creates a new SyndicationLink object with the specified Uri and media type. |
Remarks
This method creates a new SyndicationLink object and sets RelationshipType to alternate
.
CreateAlternateLink(Uri)
- Source:
- SyndicationLink.cs
- Source:
- SyndicationLink.cs
- Source:
- SyndicationLink.cs
- Source:
- SyndicationLink.cs
Creates a new SyndicationLink object with the specified Uri.
public:
static System::ServiceModel::Syndication::SyndicationLink ^ CreateAlternateLink(Uri ^ uri);
public static System.ServiceModel.Syndication.SyndicationLink CreateAlternateLink (Uri uri);
static member CreateAlternateLink : Uri -> System.ServiceModel.Syndication.SyndicationLink
Public Shared Function CreateAlternateLink (uri As Uri) As SyndicationLink
Parameters
- uri
- Uri
The URI of the linked resource.
Returns
A new SyndicationLink instance.
Examples
The following example shows how to create an alternate link.
SyndicationLink link = SyndicationLink.CreateAlternateLink(new Uri("http://server/link"));
Dim link As SyndicationLink = SyndicationLink.CreateAlternateLink(New Uri("http://server/link"))
Applies to
CreateAlternateLink(Uri, String)
- Source:
- SyndicationLink.cs
- Source:
- SyndicationLink.cs
- Source:
- SyndicationLink.cs
- Source:
- SyndicationLink.cs
Creates a new SyndicationLink object with the specified Uri and media type.
public:
static System::ServiceModel::Syndication::SyndicationLink ^ CreateAlternateLink(Uri ^ uri, System::String ^ mediaType);
public static System.ServiceModel.Syndication.SyndicationLink CreateAlternateLink (Uri uri, string mediaType);
static member CreateAlternateLink : Uri * string -> System.ServiceModel.Syndication.SyndicationLink
Public Shared Function CreateAlternateLink (uri As Uri, mediaType As String) As SyndicationLink
Parameters
- uri
- Uri
The URI of the linked resource.
- mediaType
- String
The media type of the link.
Returns
A new SyndicationLink instance.
Examples
The following example shows how to create an alternate link.
SyndicationLink link = SyndicationLink.CreateAlternateLink(new Uri("http://server/link"), "text/html");
Dim link As SyndicationLink = SyndicationLink.CreateAlternateLink(New Uri("http://server/link"), "text/html")
Applies to
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈