Advertisement
GlobalAccessSoftware

C# coding tips.

Feb 17th, 2021 (edited)
970
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.73 KB | None | 0 0
  1. ***
  2.   // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  3.   // For example, this looks simple enough...
  4.   // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  5.   {
  6.     if (ext.Contains("r"))
  7.       if (IsEncrypted(file))
  8.         listBox2.Items.Add(enc);
  9.       else
  10.         listBox2.Items.Add(rtf);
  11.     else
  12.       if (IsEncrypted(file))
  13.         listBox2.Items.Add(enc);
  14.       else
  15.         listBox2.Items.Add(txt);
  16.   }
  17. ***
  18.  
  19.   // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  20.   // SO, That's "Simple enough" right?
  21.   // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  22.   // Until you see it with lambda expressions!
  23.   // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  24.   {
  25.     listBox2.Items.Add(IsEncrypted(file) ? enc : ext.Contains("r") ? rtf : txt );
  26.   }
  27.  
  28.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement