M
Mark Allison
Hi,
Total newbie here, I'm trying to examine a bitmask which is passed into
my app as a string. I convert it to int, and try and process it. I got
the following code:
//dbStatus current is a string
int idbStatus = Convert.ToInt32(dbStatus);
string dbStatusText = string.Empty;
if (idbStatus && 1 == 1) // error on this line
{
dbStatusText = dbStatusText + "autoclose";
}
Error message is:
Operator '&&' cannot be applied to operands of type 'int' and 'bool'
Ideas? Thanks. Any good URLs for bitmask manipulation would be great!
--
Mark Allison, SQL Server MVP
http://www.markallison.co.uk
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Total newbie here, I'm trying to examine a bitmask which is passed into
my app as a string. I convert it to int, and try and process it. I got
the following code:
//dbStatus current is a string
int idbStatus = Convert.ToInt32(dbStatus);
string dbStatusText = string.Empty;
if (idbStatus && 1 == 1) // error on this line
{
dbStatusText = dbStatusText + "autoclose";
}
Error message is:
Operator '&&' cannot be applied to operands of type 'int' and 'bool'
Ideas? Thanks. Any good URLs for bitmask manipulation would be great!
--
Mark Allison, SQL Server MVP
http://www.markallison.co.uk
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html