C#C
C#3y ago
thieved

how can i add a function/method to a class that can be changed upon construction?

namespace Elfin
{
    public class ElfinCommand
    {
        public string Name;

        public ElfinCommand(ElfinCommand data)
        {
            this.Name = data.Name;
            this.Respond = data.Respond;
        }
    }
}


i'm trying to make a command class but how can i make it so i can provide a response function to the command when i construct a new one? (this.Respond)
Was this page helpful?