Click here to Skip to main content
15,898,222 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I have a code where i am getting error in Catch block stating "cannot implicitly convert type bool to kCura.EventHandler.Response". Below is my code:

C#
DTOs.RDO TR = new DTOs.RDO(this.ActiveArtifact.ParentArtifactID.Value);
TR.ArtifactTypeGuids = new List<guid>()
{
    GuidCollection.Task;
};

try
{
    Output = proxy.Repositroies.RDO.Read(TR);
}
catch(Exception ex)
{
    Utils.WrteToLog(ex.Message);
    return false;
}

I know the whole belongs to the particular API, but the error is near return false stating "cannot implicitly convert type bool to kCura.EventHandler.Response". So i want to what exactly it means and what action need to be taken. Any help would be appreciated.

What I have tried:

I tried searching in google and understood that it is some conversion issue but failed to implement and resolve this.
Posted
Updated 22-Aug-16 23:59pm
v2
Comments
Patrice T 23-Aug-16 5:25am    
The problem is that there is no kCura.EventHandler.Response in your code.
Use Improve question to update your question.

1 solution

The error message is clear: the method is supposed to return an object having kCura.EventHandler.Response type while it is returning false which is a boolean. You should return the proper (failure) Response object.
 
Share this answer
 
Comments
Maciej Los 23-Aug-16 16:11pm    
5ed!
CPallini 23-Aug-16 17:05pm    
Thank you!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900