简体   繁体   中英

How to convert the text to ValueTuple?

So I have the text like this:

Name: CD
Id: 1

Name: AB
Id: 2

Name: EF
Id: 3

I want to somehow add the id and name of each element to ValueTuple. I already figured out how to remove "Id:" and "Name:" from text but I don't know what to do next.

So I have the text like this:

Name: CD
Id: 1

Name: AB
Id: 2

Name: EF
Id: 3

I want to somehow add the id and name of each element to ValueTuple. I already figured out how to remove "Id:" and "Name:" from text but I don't know what to do next.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM