Click to See Complete Forum and Search --> : CommandConverter


ronald_yoh
May 19th, 2010, 02:43 AM
Hi there,

I have a wpf application that contains a class (say ClassA) is implementing ICommand.

Public GenericCommand:ICommand
{
......
}

In the other class, I have the follow code:

public void doSomething()
{

}

private ICommand _commandA;
public ICommand CommandA
{
get
{
return _commandA = new GenericCommand(doSomething);
}

}

everytime the above get property method is called, I'm getting the following error:

CommandConverter is unable to convert 'GenericCommand' to "System.String"

can anyone please help?

EvgenOrel
May 21st, 2010, 01:43 AM
What is "doSomething"?
If is :
[C#]
public void doSomething()
{

}
[/C#]
try that
[C#]
public string doSomething()
{
return "command"
}
[/C#]