我遇到堆栈溢出异常的问题,但我不知道是什么导致异常被抛出.我正在使用一个类库,其中包含我需要的所有方法和对象,并从控制台应用程序运行它.
任何帮助将不胜感激,因为这是一个任务的一部分,将在几个小时内到期.
这是我的代码:
TrafficIncidentNotificationRadiusCalculator类
namespace TrafficIncident
{
public class TrafficIncidentNotificationRadiusCalculator
{
public double meters;
public double CONFIGURED_NOTIFICATION_RADIUS
{
get { return CONFIGURED_NOTIFICATION_RADIUS; }
set { CONFIGURED_NOTIFICATION_RADIUS = meters; }
}
public List<string> GetNotificationRecipientsList(List<User> users, List<UserLocationUpdate> userLocation, TrafficIncidentReport report)
{
int i = 0;
List<string> userNotificationIds = new List<string>();
while (i < userLocation.Count)
{
UserLocationUpdate userLoc = userLocation.ElementAt(i);
userNotificationIds.Add(userLoc.userNotificationId);
Console.WriteLine(userNotificationIds.ElementAt(i));
i++;
}
return userNotificationIds;
}
}
}
Run Code Online (Sandbox Code Playgroud)
TrafficIncidentReport类
namespace TrafficIncident
{
public class TrafficIncidentReport
{
public double[] incidentLocation;
public double latitude …Run Code Online (Sandbox Code Playgroud)