I have the following code:
if (Session["CurrentUrl"] != null & Session["CurrentHost"] != null)
I use this in many places. I am wondering if anyone can think of a way to optimize the C# code just to make things slight more clear.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This seems like a prime candidate for an extension method:
And then: