Click here to Skip to main content
15,888,351 members
Home / Discussions / C#
   

C#

 
AnswerRe: Fastest Method for opening many text files... Pin
Luc Pattyn5-Feb-10 11:17
sitebuilderLuc Pattyn5-Feb-10 11:17 
QuestionHow can I get the selected value from a combo box Pin
tonyonlinux5-Feb-10 10:06
tonyonlinux5-Feb-10 10:06 
AnswerRe: How can I get the selected value from a combo box Pin
Not Active5-Feb-10 10:16
mentorNot Active5-Feb-10 10:16 
GeneralRe: How can I get the selected value from a combo box Pin
tonyonlinux5-Feb-10 10:19
tonyonlinux5-Feb-10 10:19 
AnswerRe: How can I get the selected value from a combo box Pin
Luc Pattyn5-Feb-10 11:23
sitebuilderLuc Pattyn5-Feb-10 11:23 
GeneralRe: How can I get the selected value from a combo box Pin
tonyonlinux5-Feb-10 12:52
tonyonlinux5-Feb-10 12:52 
GeneralRe: How can I get the selected value from a combo box Pin
Luc Pattyn5-Feb-10 12:58
sitebuilderLuc Pattyn5-Feb-10 12:58 
QuestionHow does the method work ? Pin
Mohammad Dayyan5-Feb-10 9:02
Mohammad Dayyan5-Feb-10 9:02 
Hello there,
Would you please explain , how the below method (that is bold) works ?

public class RelayCommand : ICommand
{
    readonly Action<object> _execute;
    readonly Predicate<object> _canExecute;        

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

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

        _execute = execute;
        _canExecute = canExecute;           
    }

    [DebuggerStepThrough]
    public bool CanExecute(object parameter)
    {
        return _canExecute == null ? true : _canExecute(parameter);
    }

    public event EventHandler CanExecuteChanged
    {
        add { CommandManager.RequerySuggested += value; }
        remove { CommandManager.RequerySuggested -= value; }
    }

    public void Execute(object parameter)
    {
        _execute(parameter);
    }
}


I mean , what's the meaning of : this(execute, null) ?
AnswerRe: How does the method work ? Pin
Steve Westbrook5-Feb-10 9:08
Steve Westbrook5-Feb-10 9:08 
GeneralRe: How does the method work ? Pin
Mohammad Dayyan5-Feb-10 9:14
Mohammad Dayyan5-Feb-10 9:14 
AnswerRe: How does the method work ? Pin
Luc Pattyn5-Feb-10 9:23
sitebuilderLuc Pattyn5-Feb-10 9:23 
GeneralRe: How does the method work ? Pin
Mohammad Dayyan5-Feb-10 9:27
Mohammad Dayyan5-Feb-10 9:27 
GeneralRe: How does the method work ? Pin
Mohammad Dayyan5-Feb-10 9:35
Mohammad Dayyan5-Feb-10 9:35 
AnswerRe: How does the method work ? Pin
Luc Pattyn5-Feb-10 10:02
sitebuilderLuc Pattyn5-Feb-10 10:02 
GeneralRe: How does the method work ? Pin
Mohammad Dayyan5-Feb-10 10:10
Mohammad Dayyan5-Feb-10 10:10 
AnswerRe: How does the method work ? Pin
Pete O'Hanlon5-Feb-10 10:04
mvePete O'Hanlon5-Feb-10 10:04 
GeneralRe: How does the method work ? Pin
Mohammad Dayyan5-Feb-10 10:09
Mohammad Dayyan5-Feb-10 10:09 
QuestionApplication updates Pin
Jeroen De Dauw5-Feb-10 8:47
Jeroen De Dauw5-Feb-10 8:47 
AnswerRe: Application updates Pin
Giorgi Dalakishvili5-Feb-10 8:57
mentorGiorgi Dalakishvili5-Feb-10 8:57 
QuestionFind network service address Pin
adrya5-Feb-10 4:44
adrya5-Feb-10 4:44 
AnswerRe: Find network service address Pin
Dave Kreskowiak5-Feb-10 7:16
mveDave Kreskowiak5-Feb-10 7:16 
QuestionControl pc by voice command Pin
Basudevkuet5-Feb-10 4:41
Basudevkuet5-Feb-10 4:41 
AnswerRe: Control pc by voice command Pin
OriginalGriff5-Feb-10 4:45
mveOriginalGriff5-Feb-10 4:45 
GeneralRe: Control pc by voice command Pin
Basudevkuet5-Feb-10 5:54
Basudevkuet5-Feb-10 5:54 
GeneralRe: Control pc by voice command Pin
Smithers-Jones5-Feb-10 6:17
Smithers-Jones5-Feb-10 6:17 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.