Max Tenenbaum

Max Tenenbaum

  • NA
  • 33
  • 47.9k

Line break in c#

Aug 18 2011 5:35 AM
Hi,

I am working on a condition statement with a very long opening if statement and this requires me to keep scrolling right. How can I break onto a new line so my code is easier to read but without breaking the string?

e.g.

         if (ThisUser.Company == "MyCompany" || ThisUser.Company == "MyCompany2" || ThisUser.Company == "MyCompany3" || ThisUser.Company == "MyCompany4" || ThisUser.Company == "MyCompany2")
        {
            Logo.ImageUrl = "../Images/Logo.png";
        }

Thanks

M

Answers (5)