Converting from an int to a bool in C# -
int vote; insertvotes(objecttype, objectid , vote, userid); //calling
for method call, want convert vote
bool
. how can convert it?
here method signature:
public static bool insertvotes(int forumobjecttype, int objectid, bool isthumbup, int userid) { // code... }
you can try like
insertvotes(objecttype, objectid , (vote == 1), userid); //calling
assuming 1 voted up, , 0 voted down, or that.
Comments
Post a Comment