title: How to remove waypoints from bing map in c#
body: <p>I am not able to remove waypoints from bing map in c# (WPF), i had used waypoint remove, clear, removeat but still not removed.....</p>
  
  <ol>
  <li>How to remove waypoints from bing map in c# </li>
  <li>also provide code to delete the path between waypoints </li>
  </ol>
  
  <p>Source and destination are Location(latitude,longitude)</p>
  
  <pre><code>startWaypoint = new Bing.Maps.Directions.Waypoint(Source);
  endWaypoint = new Bing.Maps.Directions.Waypoint(Destination);
  
  waypoints = new Bing.Maps.Directions.WaypointCollection();
  waypoints.Add(startWaypoint);
  waypoints.Add(endWaypoint);
  
  //Start = waypoints.IndexOf(startWaypoint);
  //End = waypoints.IndexOf(endWaypoint);
  
  directionsManager = GuideMap.DirectionsManager;
  directionsManager.Waypoints = waypoints;
  
  // Calculate route directions
  Bing.Maps.Directions.RouteResponse response = await directionsManager.CalculateDirectionsAsync();
  
  route = response.Routes[0];
  // Display the route on the map
  directionsManager.ShowRoutePath(response.Routes[0]);
  </code></pre>