resharper - What C# language features help you to reduce lines of code and improve readability? -


I came around the convenience of a C # language courtesy of ReSharper, today? Operator This helped to make the code even more condensed by my initial effort. See below to improve the line / length / readability of the code.

The first attempt can be something like this ..

  if (usersEmail == null) userName = firstName; Else userName = usersEmail;  

refacted ..

  userName = usersEmail == tap? First name: usersEmail;  

In the beginning I thought that the most effective / concise version would be above, but one third step is ...

  userName = usersEmail ?? First name; ID wants to know if you have any examples where the features of the C # language help reduce the lines of code and improve readability? 

There are a lot of gems in this thread: (which you have mentioned)


Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -