开发者

List vs. DataTable vs. DataSet

I am writing a program that performs different string operations on every letter of the alphabet. The different possibilities are stored in lists, where one operation is randomly selected. Basically I could set up the program with 26 different lists, but that means that I have to have my functions copied 26 times to refer to the different lists, and that is rather tedious.

I have hesitations about writing my program with a DataTable because I need each 开发者_开发技巧separate column to be independent. The operations in the "A" column are completely distinct from the operations in column "B". If I delete an entry in A, I would like the entries below it to move up, instead of having a null value in the table. I would like to be able to refer to the lists or datatables like table["A"][1].toSting(), etc.

TLDR; With standard programming convention, is it better to add lists to a dataTable, or is it better to add DataTables to a DataSet? Which is standard?


What about Dictionary<char, List<operation>> ?


TLDR; With standard programming convention, is it better to add lists to a dataTable, or is it better to add DataTables to a DataSet? Which is standard?

Just going off your TLDR; question, adding DataTables to a DataSet is the standard. Period.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜