How basic types get stored in asp.net session variable

这一生的挚爱 提交于 2019-12-24 08:35:55

问题


I need to know How basic types Int, enum, string get stored in session variable. Are they get serialized first before storing.


回答1:


That depends entirely on how session state is configured.

If you just store session state in-memory, serialization is not needed. The variables are stored straight into a dictionary object.

If you store session state on a session state server or in the database, then the variables are indeed serialized and deserialized all the time.

You can find out more at http://msdn.microsoft.com/en-us/magazine/cc163730.aspx.



来源:https://stackoverflow.com/questions/13008804/how-basic-types-get-stored-in-asp-net-session-variable

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!