SyndicationFeed.Clone(Boolean) 方法

定义

创建 SyndicationFeed 实例的副本。Creates a copy of the SyndicationFeed instance.

public:
 virtual System::ServiceModel::Syndication::SyndicationFeed ^ Clone(bool cloneItems);
public virtual System.ServiceModel.Syndication.SyndicationFeed Clone (bool cloneItems);
abstract member Clone : bool -> System.ServiceModel.Syndication.SyndicationFeed
override this.Clone : bool -> System.ServiceModel.Syndication.SyndicationFeed
Public Overridable Function Clone (cloneItems As Boolean) As SyndicationFeed

参数

cloneItems
Boolean

一个指定是否克隆 SyndicationItem 对象的值。A value that specifies whether the SyndicationItem objects are cloned.

返回

SyndicationFeed

一个重复的 SyndicationFeed 对象。A duplicate SyndicationFeed object.

示例

下面的代码演示如何调用此方法。The following code shows how to call this method.

SyndicationFeed feed = new SyndicationFeed();
SyndicationFeed clonedFeed = feed.Clone(true);
Dim feed As New SyndicationFeed()
Dim clonedFeed As SyndicationFeed = feed.Clone(True)

注解

如果 cloneItems 参数为 true,则会克隆 SyndicationFeed 对象中的所有项;否则,新 SyndicationFeed 实例的项集合会包含对原始 SyndicationFeed 实例的项的引用。If the cloneItems parameter is true, all items within the SyndicationFeed object are cloned; otherwise, the new SyndicationFeed instance's items collection contain references to the original SyndicationFeed instance's items.

适用于