0
有人可以幫助我將這個使用新的C#6語法的簡單代碼段翻譯成Vb.Net嗎?將C#6語法的簡單代碼轉換爲Vb.Net
產生的LINQ查詢是不完整的(錯誤的語法)從Telerik做這樣一個在某些在線服務轉換時。
/// <summary>
/// An XElement extension method that removes all namespaces described by @this.
/// </summary>
/// <param name="this">The @this to act on.</param>
/// <returns>An XElement.</returns>
public static XElement RemoveAllNamespaces(this XElement @this)
{
return new XElement(@this.Name.LocalName,
(from n in @this.Nodes()
select ((n is XElement) ? RemoveAllNamespaces(n as XElement) : n)),
(@this.HasAttributes) ? (from a in @this.Attributes() select a) : null);
}
反射V9的表現非常體面的工作,反編譯這VB。拿到你自己的副本。 –
這可能工作。 [轉換代碼](http://converter.telerik.com/)或讓你非常接近。 – JAZ