我正在实验室,我必须将两个现有的arrayLists添加到ArrayList double []对象。
var language = Application.systemLanguage.ToString();
var strings = XElement.Parse(xml)
.XPathSelectElements("./LOC_TAG")
.Select(x => new
{
Tag = x.Attribute("value").Value,
Text = x.XPathSelectElement($"./LOC_TEXT[@language='{language}']")
?.Attribute("value").Value
})
.Where(x => x.Text != null)
.ToDictionary(x => x.Tag, x => x.Text);
然后我需要将masterList传递给集合:
// first two arrayLists
ArrayList<Double> list = new ArrayList <>();
ArrayList<Double> list2 = new ArrayList <>();
// masterList - need to add list and list2.
ArrayList<double[]> masterList = new ArrayList<>();
编辑:我如何尝试将列表添加到主列表
Collection<double[]> c = masterList;
我在向MasterList添加list和list2时遇到问题。我似乎无法使用add或addAll方法。
有什么想法吗?
由于