示例#1
0
 public MainPage()
 {
     InitializeComponent();
     options.SelectedIndex = 0;
     location = new USLocations.USLocations();
     location.Helper("zipcodes.tsv");
 }
示例#2
0
        public static void Main(string[] args)
        {
            USLocations.USLocations location = new USLocations.USLocations();
            location.Helper("zipcodes.tsv");
            bool run = true;

            while (run)
            {
                String[] spearator = { " " };
                Console.Write("zipcodes>");
                string   input   = Console.ReadLine();
                String[] strlist = input.Split(spearator, StringSplitOptions.None);


                int           zip = int.Parse(strlist[1]);
                List <string> loc = location.Lookup(zip);
                foreach (string s in loc)
                {
                    Console.WriteLine(s);
                }
            }
        }