C#C
C#4y ago
stigzler

What is this type of Overloading?

I'm converting from vb to c#. What's the correct term for the line public RelayCommand(Action<object> execute) : this(execute, null) in this overloading? It's very helpful:

public class RelayCommand : ICommand
    {
        public RelayCommand(Action<object> execute, Predicate<object> canExecute)
        {
            if (execute == null)
                throw new ArgumentNullException("execute");

            _execute = execute;
            _canExecute = canExecute;
        }

        public RelayCommand(Action<object> execute) : this(execute, null)
        {

        }    
    }
Was this page helpful?