Question about &&


i got 2 questions logical operator &&.

1) it's supposed operates between 2 bool, , when operators ints (for example) implicit conversion.. in sense? ( thought if int > 0 implicit conversion returns true = 1, i'm right?)

2) && acts & internally, right?



1) check out:

int = 0; int b = 1; console.writeline("{0}", convert.toint32((a < b))); 

output: 1

2) c# language specification:

  • the operation x && y corresponds operation x & y, except that y is evaluated if x is true.

wizend



Visual Studio Languages  ,  .NET Framework  >  Visual C#



Comments

Popular posts from this blog

Azure DocumentDB Owner resource does not exist

RFC_ERROR_SYSTEM_FAILURE with SAP ECC 6 Unicode

C# System.Data.Common DbCommand and getting Datasets from Oracle