我喜欢XML
<Categories>
<category name="a">
<SubCategory>1</SubCategory>
<SubCategoryName>name1</SubCategoryName>
</category>
<category name="b">
<SubCategory>2</SubCategory>
<SubCategoryName>name2</SubCategoryName>
</category>
</Categories>
Run Code Online (Sandbox Code Playgroud)
我如何获得的值<SubCategoryName>从<category name="a">?
我想从数据表中获取前 n 条记录。
我不想运行我已经知道的循环。
我正在尝试这样做
DataTable dt = dtResult.AsEnumerable().Take(n)
Run Code Online (Sandbox Code Playgroud)
是正确的方法..?
使这“n条记录”位于另一个数据表中的过程是什么?