private void GetMAC(string tempMAC) { String value = tempMAC; Char delimiter = '@'; String[] substrings = new String[10]; substrings = value.Split(delimiter); foreach (String s in substrings) { if (s != "" & s != null) { MAC.Add(s); } } }