GlobalAccessSoftware icon

C# coding tips.

GlobalAccessSoftware | PRO | 04/24/23 08:41:31 AM UTC (Edited) | 0 ⭐ | 1354 👁️ | Never ⏰ | []
C# |

730 B

|

None

|

0 👍

/

0 👎

***
  // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  // For example, this looks simple enough...
  // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  {
    if (ext.Contains("r"))
      if (IsEncrypted(file))
        listBox2.Items.Add(enc);
      else
        listBox2.Items.Add(rtf);
    else
      if (IsEncrypted(file))
        listBox2.Items.Add(enc);
      else
        listBox2.Items.Add(txt);
  }
***
 
  // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  // SO, That's "Simple enough" right?
  // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  // Until you see it with lambda expressions!
  // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  {
    listBox2.Items.Add(IsEncrypted(file) ? enc : ext.Contains("r") ? rtf : txt );
  }
 
 

Comments