C# Conversions.ToBoolean('0'): How to Convert '0' to Boolean in C#
In C#, the Conversions.ToBoolean('0') method will return False. This is because the Conversions.ToBoolean() method interprets any non-empty string as True, including the string '0'.
Therefore, when you use Conversions.ToBoolean('0'), the method considers the string '0' as non-empty and returns False.
原文地址: https://www.cveoy.top/t/topic/qjJh 著作权归作者所有。请勿转载和采集!