I have gone through the command patterns and learned that it can hold different commands on list. So why it is constructing a complicated structure when we have simple collection classes like stack or queue. why no queue is used in command pattern?
Queue q = new Queue();
q.Enqueue('A');
q.Enqueue('M');
ch = (char)q.Dequeue();
Aucun commentaire:
Enregistrer un commentaire