can '1' be conver to true ,and the '0' conver to false ?

  • Thread starter Thread starter Kylin
  • Start date Start date
For integers System.Convert.ToBoolean(i) will return true for any non-zero
i.

Eliyahu
 
There is (see the other reply) but you should never rely on this - don't
assume the underlying correspondence of various types. Historically, this
has changed for VB, for instance.

David Anton
www.tangiblesoftwaresolutions.com
Home of the Instant C# VB.NET to C# converter
and the Instant VB C# to VB.NET converter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top