Bool to int

Convert bool to int

(int) ((this.SetmnType == NewmnType.mbol) ? 1 : 0)

 Convert float to int

 (int)(float)90f:

原文地址:https://www.cnblogs.com/greencolor/p/1712532.html