473,804 Members | 4,217 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

serialization and enum ProgramType

Why would this fail? When i rename the ProgramType to say.. ProramType it
works.. but if it is ProgramType the following error occurs.

An unhandled exception of type 'System.Invalid OperationExcept ion' occurred
in system.xml.dll

Additional information: There was an error reflecting

public class Program
{

/// <remarks/>
[System.Xml.Seri alization.XmlAt tributeAttribut e()]
public ProgramType Type;

/// <remarks/>
[System.Xml.Seri alization.XmlTe xtAttribute()]
public string Value;
}

public enum ProgramType
{

FooBar
}


Nov 12 '05 #1
0 1336

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

Similar topics

4
2336
by: ron | last post by:
Hi, I have class object that i serialize using the System.Xml.Serialization class. Intermittently the object is not getting serialized correctly, using System.Xml.Serialization classes. Therefore the application errors out when deserializing the xml data. It places the some part of the child element
1
366
by: Keshav | last post by:
Hi All, I have a class by name "Participant" and it has properties such as "Id" ,"Name",Type". Type is of type enum. I am using xmlserializer to serialize. When i serialize I should get <?xml version="1.0" encoding="utf-8"?> <Participant xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Id="2323-232-3434"
5
2834
by: francois | last post by:
First of all I would to to apologize for resending this post again but I feel like my last post as been spoiled Here I go for my problem: Hi, I have a webservice that I am using and I would like it to return an XML serialized version of an object.
6
2194
by: Polo | last post by:
Hi, I have two public enums types each defined in a class (PolarDiagram and KDiagram) in a namespace (RTech.Graphic) I try to serialize this class with XmlSerializer without success A suggestion ? Thank's Polo
0
1722
by: eSapient | last post by:
I generated serialization/deserialization code for this schema using the xsd tool: <?xml version="1.0" encoding="UTF-8"?> <xs:schema elementFormDefault="qualified" attributeFormDefault="unqualified" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:complexType name="FAAAvxType"> <xs:sequence> <xs:choice>
0
1041
by: davesauny | last post by:
Hi guys, I'm having trouble with serialization especially of array elements! What I have is an array of clsUsers which have various properties as shown in the code below The XML I want to achieve is shown at the top and underneath that is the xml i have achieved.... any help you can provide would be most helpful!
0
1508
by: student | last post by:
In Summary: Create an object - dont set one of its Enum Type properties and make sure it does not appear in XML Object Serialization. Strings function as hoped for but Enums do not Heres my problem broken down to simplest form I have the following ENUM ----------------------------------------------
0
992
by: Jeremy Chapman | last post by:
I'm building a class with xml serialization attrbutes. Below I've included the class and the xml it serializes to. It pretty much matches what I want except for the Message property of the ResultValue class. I want it to serialize to <ResultValue><Messages><Message>value</Message><Message>value2</Message></Messages></ResultValue> but it is actually serializing to...
2
7417
by: Jigar.Patel | last post by:
Hi, I have following enum definition. public enum OperationTypes { All = 1, New = 2, View = 4,
0
9707
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10082
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9161
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7622
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6856
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5525
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4301
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3823
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2997
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.