我修改了我之前的问题,我的字符串包含这样的大段:
Line= "
Name = AB | 1-2 | Name
ID = CD | 3-4 | int
Stu = EF | 5-6 | Name
Email = GH | 7-8 | string
ID = IJ | 9-10 | int
Tea = KL | 1--12 | Name
Email = MN | 13-14 | Name
ID = OP | 1-2 | int "
我想将高于 ID 的信息存储到这样的数组中:
A[0] = Name = AB | 1-2 | Name
A[1] = ID = CD | 3-4 | int
Stu = EF | 5-6 | Name
Email = GH | 7-8 | string
A[2] = ID = IJ | 9-10 | int
Tea = KL | 1--12 | Name
Email = MN | 13-14 | Name
数组应该继续,因为我在字符串中有更多数据,这个数组应该是自动组成的,有人可以帮忙吗?