System.Collections.Generic.List.Add(itemPrefix)

Here are the examples of the csharp api System.Collections.Generic.List.Add(itemPrefix) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

1 Examples 7

19 View Source File : Init.cs
License : GNU General Public License v3.0
Project Creator : nymda

public List<itemPrefix> loadItemPrefixes()
        {
            List<itemPrefix> completed = new List<itemPrefix> { };

            var replacedembly = replacedembly.GetExecutingreplacedembly();
            var resourceName = "WinTerrEdit.itemPrefixes.txt";
            string result;
            using (Stream stream = replacedembly.GetManifestResourceStream(resourceName))
            using (StreamReader reader = new StreamReader(stream))
            {
                result = reader.ReadToEnd();
            }
            List<String> dataArray = result.Split('\n').ToList();

            foreach (string str in dataArray)
            {
                string[] split = str.Split(',');
                completed.Add(new itemPrefix(Int32.Parse(split[0]), split[1]));
            }

            return completed;
        }