Would there be any noticeable performance cost when doing this:
HttpContext.Current.Request.RequestContext.RouteData.Values("key")
as opposed to this:
context.Request("key")
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Either way, you’re just accessing a collection. The RouteData.Values dictionary will be populated whether you use it or not, as will the Request.QueryString collection. There may be some overhead using Request(“key”) vs Request.QueryString(“key”), as the former has to check the form collection as well, but it would beyond trivial, and I think the query string is checked first anyway.