System.Xml.XmlImplementation.HasFeature C# (CSharp) Méthode

HasFeature() public méthode

public HasFeature ( string strFeature, string strVersion ) : bool
strFeature string
strVersion string
Résultat bool
        public bool HasFeature(string strFeature, string strVersion) {
            if (String.Compare("XML", strFeature, StringComparison.OrdinalIgnoreCase) == 0) {
                if (strVersion == null || strVersion == "1.0" || strVersion == "2.0")
                    return true;
            }
            return false;
        }

Usage Example

Exemple #1
0
 public static void HasFeatureReturnsTrueForSupportedVersion()
 {
     var target = new XmlImplementation();
     Assert.True(target.HasFeature(SupportedFeature, null));
     Assert.True(target.HasFeature(SupportedFeature, "1.0"));
     Assert.True(target.HasFeature(SupportedFeature, "2.0"));
 }
All Usage Examples Of System.Xml.XmlImplementation::HasFeature