LineWeight is of type "enum", which can be int, short, long, byte... but by default, it is of type "int" (or Int32) and is it the case for LineWeight.
So, you directly cast int and LineWeight to each other:
int lw=(int)myEntity.LineWeight;
Or
int lw=0;
myEntity.LineWeight=(LineWeight)lw; //This is the same as: myEntity.LineWeight=LineWeight.LineWeight000;