Server Error in '/' Application.

Cannot convert null to 'double' because it is a non-nullable value type

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: Microsoft.CSharp.RuntimeBinder.RuntimeBinderException: Cannot convert null to 'double' because it is a non-nullable value type

Source Error:


Line 225:{
Line 226:    careerRuns = item.Runs;
Line 227:    careerBattingAvg = item.Average;
Line 228:}
Line 229:

Source File: d:\hostingspaces\benbrook\putneycricketclub.com\wwwroot\players\compare.cshtml    Line: 227

Stack Trace:


[RuntimeBinderException: Cannot convert null to 'double' because it is a non-nullable value type]
   CallSite.Target(Closure , CallSite , Object ) +115
   System.Dynamic.UpdateDelegates.UpdateAndExecute1(CallSite site, T0 arg0) +668
   CallSite.Target(Closure , CallSite , Object ) +128
   ASP._Page_players_compare_cshtml.Execute() in d:\hostingspaces\benbrook\putneycricketclub.com\wwwroot\players\compare.cshtml:227
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +199
   System.Web.WebPages.WebPage.ExecutePageHierarchy(IEnumerable`1 executors) +73
   System.Web.WebPages.WebPage.ExecutePageHierarchy() +154
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +80
   System.Web.WebPages.WebPageHttpHandler.ProcessRequestInternal(HttpContextBase httpContext) +119


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.8.4700.0