2012-02-03 63 views
2

在.NET框架中枚舉的XPathResultType的定義給出了與「導航器」相同的「String」值(1)。當然,這不可能是正確的?是什麼賦予了?XPathResultType定義錯誤?

我正在實現一些自定義的XPath函數,我試圖編寫一個方法來驗證基於每個參數聲明的XPathResultType的函數的參數。不過,我很爲難,以我應該如何應付這種重疊...


#region Assembly System.Xml.dll, v4.0.30319 
// C:\Program Files\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\Profile\Client\System.Xml.dll 
#endregion 

using System; 

namespace System.Xml.XPath 
{ 
    // Summary: 
    //  Specifies the return type of the XPath expression. 
    public enum XPathResultType 
    { 
     // Summary: 
     //  A numeric value. 
     Number = 0, 
     // 
     // Summary: 
     //  A System.String value. 
     String = 1, 
     // 
     // Summary: 
     //  A tree fragment. 
     Navigator = 1, 
     // 
     // Summary: 
     //  A System.Booleantrue or false value. 
     Boolean = 2, 
     // 
     // Summary: 
     //  A node collection. 
     NodeSet = 3, 
     // 
     // Summary: 
     //  Any of the XPath node types. 
     Any = 5, 
     // 
     // Summary: 
     //  The expression does not evaluate to the correct XPath type. 
     Error = 6, 
    } 
} 

回答