private void GeoCode_Method1(string myaddress, int waypointIndex, string callingUser)
{
GCService.GeocodeCompleted += new EventHandler<NSpace.GCService.GeocodeCompletedEventArgs>(GeoCode_Method1_GeocodeCompleted);
GCService.GeocodeAsync(request, waypointIndex);
}
void GeoCode_Method1_GeocodeCompleted(object sender, NSpace.GCService.GeocodeCompletedEventArgs e)
{
//***QUESTION: how do I access variable "callinguser" from GeoCode_Method1 in this method??
}
Run Code Online (Sandbox Code Playgroud)
当我调用 GeoCode_Method1 时,我发送“callinguser”字符串变量,并且我想在 GeoCode_Method1_GeocodeCompleted 中访问它(异步 GeoCodingAsync 调用完成时触发)。我该怎么做呢?