Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要将 2 个值加在一起。问题是 2 个值作为字符串传递给我。它们可以是 2 位小数,所以我不能转换为整数。
有谁知道如何做到这一点?
将它们转换为浮动。float.parse(value1) + float.parse(value2)