Link to home
Start Free TrialLog in
Avatar of levyuk
levyuk

asked on

Or operator

Can I compare a string with 2 different strings? I.e.

                if (element.TagName == "A" || "a")
                {
                    MessageBox.Show("true");
                }

Doesn't seem to work, does anyone have code that could do it?
SOLUTION
Avatar of SteveGTR
SteveGTR
Flag of United States of America 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
ASKER CERTIFIED SOLUTION
Avatar of Bob Learned
Bob Learned
Flag of United States of America 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
if (element.TagName.ToString().ToUpper() == "A")

Bob
Avatar of levyuk
levyuk

ASKER

thanks guys