Esempio n. 1
0
        private static PhoneEntry CreateEntry(string[] entryData, string[] names)
        {
            PhoneEntry phoneEntry;

            if (names.Length == 3)
            {
                phoneEntry =
                    new PhoneEntry(names[0].Trim(), entryData[1].Trim(), entryData[2].Trim(), names[2].Trim(), names[1].Trim());
            }
            else if (names.Length == 2)
            {
                phoneEntry =
                    new PhoneEntry(names[0].Trim(), entryData[1].Trim(), entryData[2].Trim(), names[1].Trim());
            }
            else
            {
                phoneEntry =
                    new PhoneEntry(names[0].Trim(), entryData[1].Trim(), entryData[2].Trim());
            }

            return(phoneEntry);
        }
Esempio n. 2
0
        private static void CreateEntry(List <PhoneEntry> phoneEntries, string[] entryData, string[] names)
        {
            if (names.Length == 3)
            {
                PhoneEntry phoneEntry = new PhoneEntry(names[0].Trim(), entryData[1].Trim(), entryData[2].Trim(),
                                                       names[2].Trim(), names[1].Trim());

                phoneEntries.Add(phoneEntry);
            }
            else if (names.Length == 2)
            {
                PhoneEntry phoneEntry = new PhoneEntry(names[0].Trim(), entryData[1].Trim(), entryData[2].Trim(),
                                                       names[1].Trim());

                phoneEntries.Add(phoneEntry);
            }
            else
            {
                PhoneEntry phoneEntry = new PhoneEntry(names[0].Trim(), entryData[1].Trim(), entryData[2].Trim());

                phoneEntries.Add(phoneEntry);
            }
        }
Esempio n. 3
0
        private static void CreateEntry(List<PhoneEntry> phoneEntries, string[] entryData, string[] names)
        {
            if (names.Length == 3)
            {
                PhoneEntry phoneEntry = new PhoneEntry(names[0].Trim(), entryData[1].Trim(), entryData[2].Trim(),
                    names[2].Trim(), names[1].Trim());

                phoneEntries.Add(phoneEntry);
            }
            else if (names.Length == 2)
            {
                PhoneEntry phoneEntry = new PhoneEntry(names[0].Trim(), entryData[1].Trim(), entryData[2].Trim(),
                    names[1].Trim());

                phoneEntries.Add(phoneEntry);
            }
            else
            {
                PhoneEntry phoneEntry = new PhoneEntry(names[0].Trim(), entryData[1].Trim(), entryData[2].Trim());

                phoneEntries.Add(phoneEntry);
            }
        }