I want to assign two variables to integer and decimal parts on double. how to do it?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
One way would be
int x = abc.toInt()
int y = int.tryParse(abc.toString().split('.')[1]);
I want to assign two variables to integer and decimal parts on double. how to do it?
One way would be
int x = abc.toInt()
int y = int.tryParse(abc.toString().split('.')[1]);