title: Split method to divide the address into street, city, state, and zip code and display only the street and city segments
body: <p>This is what I've been asked: 
  Use a Split method to divide the address into street, city, state, and zip code and display only the street and city segments</p>
  
  <p>What is my error?
  Address format: 123 ABC Dr, Omaha, NE 12345
  Here is my code: (It only shows the street number).</p>
  
  <pre><code>/*Address code now*/
              Console.Write("\n\nWhat's your university address:");
              string strUAAaddress = (Console.ReadLine());
  
  
              /*divide the address into street, city, state, and zip code. display only the street/city*/
              strUAAaddress=strUAAaddress.Trim();
             if (strUAAaddress.StartsWith(" "))
                  strUAAaddress = strUAAaddress.Remove(0, 1); 
            string[] addressParts = strUAAaddress.Split(' '); //strUAAaddress.Split(' ');
            string street = addressParts[0];
            string state = addressParts[2];
            string city = addressParts[1];
            string zipCode = addressParts[3];
  
            Console.WriteLine(street); Console.Write(city); Console.Write(zipCode); Console.Write(state);
  </code></pre>