5
Reply

Line break in c#

Max Tenenbaum

Max Tenenbaum

Aug 18 2011 5:35 AM
3k
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)