Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 507
  • Last Modified:

(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);
}
0
yguyon28
Asked:
yguyon28
  • 2
2 Solutions
 
yguyon28Author Commented:
Does (int? id mean its nulable....
0
 
Paul JacksonCommented:
Yes int? means id is nullable
0
 
Paul JacksonCommented:
Here's some info on nullable types :

http://msdn.microsoft.com/en-us/library/2cf62fcy.aspx
0
 
Carl TawnSystems 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

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now