What exactly is being serialized when you perform serialization in .net?
Answer / Kishor Kumar
During serialization in .NET, an object graph (a collection of interconnected objects) is converted into a format that can be stored or transmitted. The exact data being serialized depends on the serializer's implementation and settings but typically includes all public properties, fields, and any referenced child objects.nnExample:nn```csharpnusing System.Runtime.Serialization;nclass Program {n static void Main() {n var person = new Person { Name = "John", Age = 30 };n var formatter = new BinaryFormatter();n using (var stream = new FileStream("person.dat", FileMode.Create)) {n formatter.Serialize(stream, person);n }n }n}nclass Person : ISerializable {n public string Name { get; set; } n public int Age { get; set; } n}
| Is This Answer Correct ? | 0 Yes | 0 No |
Is atl redundant in the .net world?
How to load the contents of an xml file into an xmldocument object?
What are the authentication methods in .net?
How to create multiple inheritance in c#, with example?
What does stateless mean?
What is JIT and how is works?
Tell us what is the difference between struct and class?
Will my .net app run on 64-bit windows?
How is a managed code executed?
Is .net front end or backend?
What is managed code execution?
what is AGILE SCRUM methodoly....?