473,385 Members | 1,942 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,385 software developers and data experts.

Problem with XmlSerializer

When i make a call to

XmlSerializer xs = new XmlSerializer(System.Type.GetType("myobject"));
I get this error
Key cannot be null. Parameter name: key

what is the cause of this?

Nov 12 '05 #1
1 1773

<jw*****@gmail.com> schrieb im Newsbeitrag
news:11**********************@g47g2000cwa.googlegr oups.com...
When i make a call to

XmlSerializer xs = new XmlSerializer(System.Type.GetType("myobject"));
I get this error
Key cannot be null. Parameter name: key

what is the cause of this?


Don't use a string...use an object

XmlSerializer xs = new XmlSerializer(System.Type.GetType(myobject));
Nov 12 '05 #2

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

Similar topics

1
by: Thomas | last post by:
Hi, I implemented a composite pattern which should be serializable to xml. After spending some time in the newsgroups, i finally managed serializing, even with utf-8 instead of utf-16, which...
11
by: Nick Flandry | last post by:
Hi all, When I run this code: XmlSerializer theXS; try { theXS = new XmlSerializer(typeof(TableInfo)); } catch( System.Exception eAll )
3
by: Mark | last post by:
Hi all, i'm trying to serialize a class. Using the constructor of XmlSerializer i get these (odd?) errors: "File or assembly name goseij9w.dll, or one of its dependencies, was not found"....
12
by: SJD | last post by:
I've just read Christoph Schittko's article on XmlSerializer: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnxmlnet/html/trblshtxsd.asp . . . and very informative it is too....
1
by: Sacha | last post by:
I'm having trouble serializing some of my classes when using late binding. When I don't use late binding, it works fine. MyClass inherit from an abstract class called AbsMyClass. If I do the...
0
by: David Preuss | last post by:
Hi all, i have a problem with a class which has several subclasses embedded when trying to deserialize it. Serializing works just fine. The xml is as follows: <?xml version="1.0"...
4
by: pei_world | last post by:
I have followed a example from a book exactly, but it seems not working at all. can anyone tell me what is going on? ========= Global.asax.cs ============ public static Entry...
1
by: Curious | last post by:
Hi, I am trying to use the following code to make xml serialization to a file. The following error is being given: "An unhandled exception of type 'System.InvalidOperationException' occurred...
0
by: Kapil Joshi | last post by:
Hi, This issue is related to System.Xml.Serialization.XmlElementArrayAttribute class. We are using VS.NET 2005 (RTM) Professional Edition version 8.0.50727.42 (RTM.050727-4200)....
2
by: OllieHag | last post by:
Hi, can anyone help me out with this problem? In the code posted below, why does my count of Data objects only return 1, not 3. If I comment out the IXmlSerializable inheritance in the Data class,...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.