- Trending Categories
- Data Structure
- Operating System
- C Programming
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
What is serialization in C#.NET?
Serialization converts objects into a byte stream and brings it to a form that it can be written on stream. This is done to save it to memory, file or database.
Serialization can be performed as −
All the members, even members that are read-only, are serialized.
It serializes the public fields and properties of an object into XML stream conforming to a specific XML Schema definition language document.
Let us see an example. Firstly set the stream −
FileStream fstream = new FileStream("d:\
ew.txt", FileMode.OpenOrCreate); BinaryFormatter formatter=new BinaryFormatter();
Now create an object of the class and call the constructor which has three parameters −
Employee emp = new Employee(030, "Tom", “Operations”);
Perform serialization −
- What is Binary Serialization and Deserialization in C# and how to achieve Binary Serialization in C#?
- What is Serialization in Java?
- What is ViewData in ASP .Net MVC C#?
- C# object serialization
- Serialization and Deserialization in C#
- What are access specifiers in C#.NET?
- What is the difference between Serialization and Deserialization in Java?
- What is the significance of NonActionAttribute in ASP .Net MVC C#?
- What is net investment hedge?
- What is the base class for all data types in C#.NET?
- What is the use of ChildActionOnly attribute in ASP .Net MVC C#?
- What is Net Working Capital Ratio?
- What are the different access specifiers in C#.NET?
- What is Net Working Capital (NWC) Flow?
- What is Net Concept of Working Capital?