C# Cant understand, need help(rus) | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

C# Cant understand, need help(rus)

Описание: Реализуется класс, упрощающий разработчику обработку консольных команд. Класс является оберткой над деревом, хранящим в себе все возможные команды, применяемые в вашей программе. Каждый узел дерева является одной подкомандой и за каждым узлом дерева может быть закреплена функция, выполняемая при остановке в этом узле. При создании объекта вашего класса разработчик может указать, какие команды используются в его программе, и закрепить за отдельными из них функции, которые будут выполняться при вводе соответствующих команд. Пример (со стороны разработчика): Заполнение дерева: command_tree = new CommandTree(); ... command_tree.AddSubNode("exit").SetNodeAction(Exit); Собственно вопрос в последней строке: не понимаю почему после вызова объекта класса идёт несколько точек вроде же один метод будет только выполнять??

7th Dec 2019, 9:13 AM
Николай Завальский
Николай Завальский - avatar
2 Answers
+ 1
@RKK 🤨 There are people on this forum who do speak Russian.. Here is the translation from google translate....Hopefully nothing was lost in the translation. 🙂 Maybe you can review his question.. and use translate to put the answer back into Russian. :😉 Here is the content of his post ------------------------------------------------------------------------ Вот содержание его поста. Description: A class is being implemented that simplifies the development of console command processing for the developer. A class is a wrapper over a tree that stores all the possible commands used in your program. Each node of the tree is one subcommand, and each node of the tree can be assigned a function that is executed when it stops at this node. When creating an object of your class, the developer can specify which commands are used in his program and assign functions to them that will be executed when the corresponding commands are entered. Example (from the developer): Tree filling: command_tree = new CommandTree(); ... command_tree.AddSubNode("exit").SetNodeAction(Exit); Actually, the question is in the last line: I don’t understand why, after calling the class object, there are several points, it seems like one method will only execute ??
15th Dec 2019, 4:13 PM
laura
0
Please use GOOGLE TRANSLATOR if u cant speak or write english. Its very difficult for those answerer to first translate the questions into english and then answer. i hope you understand!
8th Dec 2019, 7:07 AM
Rohit