Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/amazon-s3/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 使用字典生成xml<;列表<;字符串>;,列表<;字符串>&燃气轮机;_C#_Xml_Xml Serialization_Linq To Xml - Fatal编程技术网

C# 使用字典生成xml<;列表<;字符串>;,列表<;字符串>&燃气轮机;

C# 使用字典生成xml<;列表<;字符串>;,列表<;字符串>&燃气轮机;,c#,xml,xml-serialization,linq-to-xml,C#,Xml,Xml Serialization,Linq To Xml,我正在做这样的口述 private readonly Dictionary<List<String>,List<string>> _optionsetlist=new Dictionary<List<string>, List<string>>(); List<string> optionset = new List<string> { _someText, _noteText, _optio

我正在做这样的口述

  private readonly Dictionary<List<String>,List<string>> _optionsetlist=new Dictionary<List<string>, List<string>>();
 List<string> optionset = new List<string> { _someText, _noteText, _optionsetLanguage, _optionsetselected };
_optionsetlist.a(optionset,optionset);
字典中的每个列表由4个值组成

样本输出

    <CheckItemDetail CheckItemTypeId="C8C7D303-F9A0-4304-B865-9803034F4F4C"                      ButtonTypeId="25F6C9AA-5714-4646-944C-0C2325A74A88">
             <ToBeChecked>Y</ToBeChecked>
       <Applicability> 4,5,6 </Applicability>
      <Images>DDDDDDDD-F8B0-4A99-B699-F574E62A5425.jpg</Images>
     <DataDefinition>
          <DisplayOptions>
          <OptionSet Lang="GE" Default="true">
    <Designation>Motorraumverschalung inkl. Gummilippen</Designation>
       <Note>keine Beschädigungen </Note>
  </OptionSet>
</DisplayOptions>
 </DataDefinition>
 </CheckItemDetail>

Y
4,5,6 
DDDD-F8B0-4A99-B699-F574E62A5425.jpg
摩托罗姆弗斯查隆inkl。古米利彭
keine Beschädigungen
以上输出的这4个细节应该用字典填写

 <OptionSet Lang="GE" Default="true">
<Designation>Motorraumverschalung inkl. Gummilippen</Designation>
   <Note>keine Beschädigungen </Note>

摩托罗姆弗斯查隆inkl。古米利彭
keine Beschädigungen

A
List
是一个非常特殊的按键选择。您不是只想要一个
元组吗?
?请在问题中添加一个示例输出。以前,当听写器在那里时,我使用像下面这样向听写器添加项目_optionsetlist.add(optionset,optionset);如何在元组中添加项目如果你总是添加相同的两个项目,那么一个
列表就足够了。我已经编辑了这个问题
 <OptionSet Lang="GE" Default="true">
<Designation>Motorraumverschalung inkl. Gummilippen</Designation>
   <Note>keine Beschädigungen </Note>