Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 10449

Re: PB.Net 12.5 : Inherit Problem with WCF-Services

$
0
0

Instead of creating a descendant class, create a wrapper class that includes the ancestor class as an attribute.  So the descendant class would look like this as far as instance variables.

 

baseclass  common

string  world = "world"

 

In the method where you are going to pass that back, you determine whether or not the common attribute gets created.

 

childclass obj

obj = create childclass

obj.common = create baseclass

etc. etc. etc.

return obj

 

Rather than a flat structure you get a nested structure, with the base attributes in the "common" (as I called them here) branch.


Viewing all articles
Browse latest Browse all 10449

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>