473,396 Members | 1,767 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

XmlInclude and inherited classes.

I am trying to deserialize some input that can have multiple types of
outputs. I have:

<XmlInclude(GetType(ProductReportInfo))_
Public Property AdditionalInfo() As AdditionalReportInfo

But the compiler gives me:

Error 1 Attribute 'XmlIncludeAttribute' cannot be applied to
'AdditionalInfo' because the attribute is not valid on this declaration type.

I right now only have (I pan to extend this)

<XmlType(), Serializable()_
Public MustInherit Class AdditionalReportInfo
End Class

Public Class ProductReportInfo
Inherits AdditionalReportInfo
Public SKU As String
End Class

What am I doing wrong?

Thank you.

Kevin
Jul 22 '06 #1
0 1064

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: yuriy_zubarev | last post by:
Greetings, Simple scenario: I have objects that need to be persisted in XML. The declaration is as follows: public class Zoo { protected Animal animals;
1
by: Bob Rock | last post by:
Hello, I have a web method that serializes a class that includes among its public fields a System.Object field to which, at runtime, I assign instances of various different classes. When...
4
by: Dan | last post by:
I have a need to make a set of classes that all share the same public methods, some implementation and some data. So, I made an abstract base (BaseClass) with an interface (IBaseClass) and a...
0
by: Matthias De Ridder | last post by:
Hello, I have a Web service method who's returning an ArrayList of a custom class Tender: public ArrayList GetTenders(string user, string password){ // code}
0
by: goteti | last post by:
Hello, I have a method with these attributes: public GetCardsResponse GetCards(GetCardsRequest getCardsRequest) {
0
by: urban011 | last post by:
I need to use XmlInclude to generate a description in the wsdl for a subtype for a given web method. I alos need to include the SoapRpcMethod directive and the use=literal attribute in order to...
14
by: lovecreatesbea... | last post by:
Could you tell me how many class members the C++ language synthesizes for a class type? Which members in a class aren't derived from parent classes? I have read the book The C++ Programming...
12
by: Janaka Perera | last post by:
Hi All, We have done a object oriented design for a system which will create a class multiply inherited by around 1000 small and medium sized classes. I would be greatful if you can help me...
1
by: kikisan | last post by:
I am developing a windows service which utilizes the following classes: interface IPersistable; abstract class PersistableObject : IPersistable;
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.