***
// =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
// 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