E
E
ekdown2014-11-06 21:58:44
C++ / C#
ekdown, 2014-11-06 21:58:44

How to parse string in c# console application?

Good evening!
How to make it so that
string command = Console.ReadLine()
commands separated by a space are selected from the input string in the console application and entered into an array?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Дмитрий Харитонов, 2014-11-06
@ekdown

string[] cmds = Console.ReadLine().Split(new char[] {' '}, StringSplitOptions.RemoveEmptyEntries);

Судя по документации

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question