5
Answers

Getting or Setting?

S

S

12y
1.1k
1
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)