Why C# create exception on this 2 line code
public JsonResult ChangeEmail(string email)
{
return Json(new Dictionary<string, object>(){
{"errors","You need to fill the email first"}
});
}
An exception of type 'System.NullReferenceException' occurred in
TwoMinuteEnglish.dll but was not handled in user code
Additional information: Object reference not set to an instance of an object.
I am confused why my code make exception. Do someone know why this not
return but make a exception.
No comments:
Post a Comment