For this method call, I want to convertint vote; Insertvotes(objectType, objectId , vote, userID); //calling
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
Assuming that 1 is voted up, and 0 is voted down, or something like that.Insertvotes(objectType, objectId , (vote == 1), userID); //calling
0 comments:
Post a Comment