>>> a = 1
>>> b = 3
>>> print(a/b)
0.3333333333333333
>>> #方法一:
... print(round(a/b,2))
0.33
>>> #方法二:
... print(format(float(a)/float(b),'.2f'))
0.33
>>> #方法三:
... print ('%.2f' %(a/b))
0.33
>>>
>>> a = 1
>>> b = 3
>>> print(a/b)
0.3333333333333333
>>> #方法一:
... print(round(a/b,2))
0.33
>>> #方法二:
... print(format(float(a)/float(b),'.2f'))
0.33
>>> #方法三:
... print ('%.2f' %(a/b))
0.33
>>>
代碼: public class PropertiesControl : Grid { [TypeConverter(typeof(LengthConverter))] public d