// Collection of code snippets by Arne Vajhøj // (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) using System; using System.Collections.Generic; namespace E { public class Program { public static void Main(string[] args) { string[] tmpArray = new string[5]; tmpArray[0] = "billede1.jpg"; tmpArray[1] = ""; tmpArray[2] = "billede3.jpg"; tmpArray[3] = "billede4.jpg"; tmpArray[4] = ""; List tmpList = (new List(tmpArray)).FindAll(delegate(string s) { return s != null && s != ""; }); foreach(string s in tmpList) { Console.WriteLine(s); } } } }