(int? id, bool? saveChangesError=false

Could someone tell me what this line of code mean


int? id, bool? saveChangesError=false



public ActionResult Delete(int? id, bool? saveChangesError=false)
{
    if (id == null)
    {
        return new HttpStatusCodeResult(HttpStatusCode.BadRequest);
    }
    if (saveChangesError.GetValueOrDefault())
    {
        ViewBag.ErrorMessage = "Delete failed. Try again, and if the problem persists see your system administrator.";
    }
    Student student = db.Students.Find(id);
    if (student == null)
    {
        return HttpNotFound();
    }
    return View(student);
}
yguyon28Asked:
Who is Participating?
 
Paul JacksonConnect With a Mentor Software EngineerCommented:
Here's some info on nullable types :

http://msdn.microsoft.com/en-us/library/2cf62fcy.aspx
0
 
yguyon28Author Commented:
Does (int? id mean its nulable....
0
 
Paul JacksonSoftware EngineerCommented:
Yes int? means id is nullable
0
 
Carl TawnConnect With a Mentor Systems and Integration DeveloperCommented:
It is specifying that id is a Nullable<int> and saveChanges is a Nullable<bool> with a default value of false.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.