Here the Question: Converting from an int to a bool in C#

int vote;
Insertvotes(objectType, objectId , vote, userID); //calling
For this method call, I want to convert vote to a bool. How can I convert it?
Here is the method signature:
 public static bool Insertvotes(int forumObjectType, 
                                int objectId,
                                bool isThumbUp, 
                                int userID) {
    // code...
}

Answers IS:

You can try something like
Insertvotes(objectType, objectId , (vote == 1), userID); //calling
Assuming that 1 is voted up, and 0 is voted down, or something like that.

0 comments: