CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2009
    Posts
    10

    Seriliasation - OOP issue

    Hello.

    I have class "A" that needs to creat another class "B".
    In one case, class "B" needs to have one attribute/field and in another case two attributes/fields.

    I thought to split class "B" into two classes "C" and "D" that one will have one attribute ant the other one two. constructor of "A" will know which to create.

    so far - so good.

    now I need to serialize the whole thing.
    in the output xml, "C" or "D" must have the same node name.

    How can I do this?
    Any other options I have?

    Thanks.

  2. #2
    Join Date
    May 2009
    Location
    Bengaluru, India
    Posts
    460

    Re: Seriliasation - OOP issue

    since class "C" and class "D" are two different entities altogether you cannot have a common node name i suppose.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured