Guest User

Guest User

  • Tech Writer
  • 357
  • 118.6k

Getting or Setting?

Mar 28 2012 9:51 AM
Hi

Given the following code:-

private int ProductId
{
        set { Session["productId"] = value; }
        get { return int.Parse(Session["productId"].ToString()); }
}

Would the following code be Getting or Setting the property?

ProductId = int.Parse(Page.RouteData.Values["productid"].ToString());

Thanks
Steven

Answers (5)