Link to home
Start Free TrialLog in
Avatar of casstd
casstd

asked on

C# string and bool value check in single line having problem.

Hi,

         I am working in C#, ASP.NET2.0. When the user login I have to check the two values one is bool and another is String.
if (IsChangePwd=true && Session["CompanyType"] = "0001")
// I get error in this line Operator && can be used for object bool and object string type.

Could anyone help me how to fix this.
Thank you.



 
ASKER CERTIFIED SOLUTION
Avatar of Fahad Mukhtar
Fahad Mukhtar
Flag of Pakistan image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
in C# comaparison Operator is == not =