Check if one list contains all items from another list in order

后端 未结 4 1189
眼角桃花
眼角桃花 2020-12-16 06:51

How can I determine if List A contains all of the elements from List B in the same order?

List A can have additional elements that List B does not have, but must co

4条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-16 07:07

    Use String.Join() to concat ListA elements together. Then use it again to concat ListB elements together. Then use ConcatListA.IndexOf(ConcatListB).

提交回复
热议问题