为什么我们在asp.net中使用序列化? [英] Why we use Serialization in asp.net ?

查看:83
本文介绍了为什么我们在asp.net中使用序列化?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为什么我们在asp.net中使用序列化?

Why we use Serialization in asp.net ?

推荐答案

在学习.NET序列化之前,您需要了解它的含义以及通用目的:< a href =http://en.wikipedia.org/wiki/Serialization> http://en.wikipedia.org/wiki/Serialization [ ^ ]。



如果你仍然无法理解目的,请考虑关于此:在运行时,您可以在内存中创建和修改某些对象。如果您关闭申请,会发生什么?他们消失了。但是如果你需要再次打开应用程序并拥有以前用过的相同对象呢?



类似的事情是关于网络。您的应用程序位于某个网络上的多个位置?你怎么能使用相同的共享对象?请记住,正式您正在处理两个独立的进程,即使您将它们放在同一台计算机上也是如此。



-SA
Before learning .NET serialization, you need to learn what it means and what are the general purposes: http://en.wikipedia.org/wiki/Serialization[^].

If you still cannot understand the purpose, think about this: during runtime, you create and modify certain objects in memory. What happens to them if you close the application? They disappear. But what if you need to open the application again and have the same objects you used to have before?

Similar thing is about networking. What is your application is located on more than one places on some network? How can you use the same shared objects? Remember that formally you are dealing with two separate processes, which are well isolated, even if you had them on the same computer.

—SA


简单来说,序列化是将对象类型转换为字节流的过程。阅读以下帖子以清除您的概念。



序列化 [ ^ ]
In simple terms serialization is process of convert an object type into stream of bytes. Read following post to clear your concepts.

Serialization[^]


这篇关于为什么我们在asp.net中使用序列化?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆