CommandConverter
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: CommandConverter

  1. #1
    Join Date
    Nov 2008
    Posts
    3

    CommandConverter

    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?

  2. #2
    Join Date
    May 2010
    Posts
    2

    Re: CommandConverter

    What is "doSomething"?
    If is :
    [C#]
    public void doSomething()
    {

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center