我正在獲取.resx文件中多個元素的值。在一些data元素<comment>子元素不存在,所以當我運行以下時,我會得到一個NullReferenceException。 foreach (var node in XDocument.Load(filePath).DescendantNodes())
{
var element = node as XElement;
if (
將JavaScript放入C#中的XElement對象中的正確方法是什麼? 目前,我有以下幾點: using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Linq;
names