Results 1 to 6 of 6

Thread: C sharp Serialization

  1. #1
    Join Date
    Dec 2009
    Posts
    59

    C sharp Serialization

    Hi Guys,

    I am IT student with lots of queries regarding the C sharp Serialization. I don't have any idea regarding the exact use of Serialization in C sharp programming language. Which key is used to achieve the Serialization in C sharp. If you posses any knowledge regarding the C sharp Serialization and it's example then please let me aware about that. your help will be appreciated.

  2. #2
    Join Date
    Apr 2008
    Posts
    1,948

    Re: C sharp Serialization

    Hi Friend,

    In C sharp programming language the Serialization is achieved through the 'Serializable' keyword. the C shrap Serialization useful to ensure that the class object can Serializable over the XML format basically for the exchange of data among the disparate systems. C sharp Serialization is also essential if the class object is being inherited by another class objects that requires the serialized downstream. I hope this information regarding the C sharp Serialization will solve you confusion regarding this.

  3. #3
    Join Date
    May 2008
    Posts
    2,012

    Re: C sharp Serialization

    Hi,

    Serialization is very mechanism of converting an class object into the binary representation. It is essential to save the setting of file. We can Serialize our own classes by marking them as a 'Serializable'. This will Serialize all the class members except the NonSerialized class members. C sharp Serialization uses the 'System.Xml.Serialization'. C sharp can not serialize the class members which are defined as private.

  4. #4
    Join Date
    Apr 2008
    Posts
    2,005

    Re: C sharp Serialization

    Hi, Below is the example of C sharp Serialization:
    [Serializable]

    public class CsharpSr

    {
    private int sCount1;

    public int stockCount1
    {
    get

    {
    return sCount1;
    }

    set

    {
    sCount1 = value1;
    }
    }

    [NonSerialized] private int temp1;

    private string storeName1 = "Demo program";

    public Store1()
    {
    stockCount1 = 0;
    }

    }

  5. #5
    Join Date
    May 2008
    Posts
    2,297

    Re: C sharp Serialization

    Hello Friend,

    Each and every advanced programming language comprises a functionality which enables us to serialize the class objects. Serialization can be easily implemented in the c sharp language and in the .NET Framework. Using 'Serializable' keyword you can implement the Serialization in C#. If you want class of your c sharp program to control their de-serialization as well as the serialization then you need to use the 'ISerializable' interface of the C sharp.

  6. #6
    Join Date
    Oct 2005
    Posts
    2,393

    Re: C sharp Serialization

    Hi friend,

    You should use the interface known as 'ISerializable' to apply the Serialization in the C sharp. This interface comprise one single method known as 'MySerializableClass' method. This method is essential for the implementation of interface known as 'System.Runtime.Serialization.ISerializable'. You use the StreamingContext object as well as the SerializationInfo object from the method 'GetObjectData'. Namespace 'System.Runtime.Serialization' includes the member 'IFormatter'.

Similar Threads

  1. Sharp 007SH Hybrid An 3D Clamshell Android Phone by Sharp
    By jackalz in forum Web News & Trends
    Replies: 3
    Last Post: 22-05-2011, 07:28 AM
  2. Serialization in Vb.net
    By samualres in forum Software Development
    Replies: 5
    Last Post: 03-03-2010, 11:23 AM
  3. Advantages of serialization
    By ScarFace 01 in forum Software Development
    Replies: 5
    Last Post: 06-02-2010, 11:51 AM
  4. What does serialization mean in java?
    By Honorata in forum Software Development
    Replies: 3
    Last Post: 24-11-2009, 08:35 AM
  5. Some questions regarding serialization
    By MABON in forum Software Development
    Replies: 3
    Last Post: 13-11-2009, 04:58 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,751,882,547.76406 seconds with 16 queries