XmlNode.Supports(String, String) 方法

定义

测试 DOM 实现是否实现特定的功能。Tests if the DOM implementation implements a specific feature.

public:
 virtual bool Supports(System::String ^ feature, System::String ^ version);
public virtual bool Supports (string feature, string version);
abstract member Supports : string * string -> bool
override this.Supports : string * string -> bool
Public Overridable Function Supports (feature As String, version As String) As Boolean

参数

feature
String

要测试的功能的程序包名称。The package name of the feature to test. 该名称不区分大小写。This name is not case-sensitive.

version
String

要测试的程序包名称的版本号。The version number of the package name to test. 如果不指定版本 (null),则支持该功能的任何版本会导致方法返回 true。If the version is not specified (null), supporting any version of the feature causes the method to return true.

返回

Boolean

如果指定的版本中实现了该功能,则为 true;否则为 falsetrue if the feature is implemented in the specified version; otherwise, false. 下表描述返回 true 的组合。The following table describes the combinations that return true.

FeatureFeature VersionVersion
XMLXML 1.01.0
XMLXML 2.02.0

适用于