Im having a problem understanding if accessing httpcontext inside a shared function, without passing in the httpcontext as a parameter is thread safe?
My questions is: Are the 2 functions in the util class equally thread safe?
Class foo
Sub main()
Dim qs1 = util.getQS(HttpContext.Current)
Dim qs2 = util.getQS()
End Sub
End Class
Class util
Shared Function getQS(hc As HttpContext) As String
Return hc.Request.QueryString.ToString
End Function
Shared Function getQS() As String
Return HttpContext.Current.Request.QueryString.ToString
End Function
End Class
EDIT
I found a SO post that i missed in my initial research, which also have some good answers.
For the interested:
HttpContext.Current.Response inside a static method