+ 1

How to accept string input in arrays?? C#

17th Dec 2020, 5:46 AM
Yuexue
Yuexue - avatar
3 Answers
+ 3
Define specific delimiters like space, tab or comma and then use spliter Ex: User input "a, b, c, d" var input = Console.ReadLine().Split(',') ;
17th Dec 2020, 8:59 AM
hossein B
hossein B - avatar
+ 1
Use a loop to iterate the array elements. And handle the input to them.
17th Dec 2020, 6:03 AM
ä½ ēŸ„é“č¦å‰‡ļ¼Œęˆ‘也ę˜Æ
ä½ ēŸ„é“č¦å‰‡ļ¼Œęˆ‘也ę˜Æ - avatar
0
I have tried it. But I'm trying to input a string,
17th Dec 2020, 6:09 AM
Yuexue
Yuexue - avatar