Last post Sep 15, 2014 03:36 PM by Mikesdotnetting
Sep 15, 2014 03:13 PM|bsurendiran|LINK
what is diffference between session.remove and session["key"]=null
Will there be any performance impact in the above code?
Sep 15, 2014 03:36 PM|Mikesdotnetting|LINK
Session.Remove actually removes the value and key. The other option sets the value of the key to null. In the first, the Session.Contents.Count value will be decremented by 1. In the other, the count will remain the same.
I doubt that there would be any significant difference in performance between the two approaches.