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

job syspolicy_purge_history job fail in sqlserver 2008

Trying to register with public marketplace error with 'Get-AzureStackStampInformation'