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

Two Dimensional Array

Hi all Pro,

I have the class call "Person", and I do declare two dimensional array type
of string inside this class which will keep "First_Name" and "Last_Name" as
the record. When I try to serialize it by using XMLSerializer, I got error
like this:

An unhandled exception of type 'System.InvalidOperationException' occurred
in system.xml.dll
Additional information: There was an error reflecting type
'WindowsApplication1.Array_Serialize'.

Does some Pro out there did encounter this problem before? I did try to
serialize with one dimensional array and it works fined, but not for two
dimensional array. May some Pro help please. Thanks you all in advance and
I'm deeply appreciated for your help. Have a good one...

Kate
Nov 12 '05 #1
4 7576
The XmlSerializer does not serialize multidimensional arrays. It does do
jaggedd arrays though.

If your design permits, you change

public string[1,1] foo;
to
public string[][] foo;

--
HTH
Christoph Schittko [MVP, XmlInsider]
Software Architect, .NET Mentor

"cql60" <cq***@yahoo.com> wrote in message
news:eg**************@TK2MSFTNGP11.phx.gbl...
Hi all Pro,

I have the class call "Person", and I do declare two dimensional array type of string inside this class which will keep "First_Name" and "Last_Name" as the record. When I try to serialize it by using XMLSerializer, I got error
like this:

An unhandled exception of type 'System.InvalidOperationException' occurred
in system.xml.dll
Additional information: There was an error reflecting type
'WindowsApplication1.Array_Serialize'.

Does some Pro out there did encounter this problem before? I did try to
serialize with one dimensional array and it works fined, but not for two
dimensional array. May some Pro help please. Thanks you all in advance and
I'm deeply appreciated for your help. Have a good one...

Kate

Nov 12 '05 #2
Thanks you so much for your help, I'm deeply appreciated.

May you tell me how can I initialize my array? Have a nice weekend...

Cheers,

Kate

"Christoph Schittko [MVP]" <ch********************@austin.rr.com> wrote in
message news:OX*************@TK2MSFTNGP12.phx.gbl...
The XmlSerializer does not serialize multidimensional arrays. It does do
jaggedd arrays though.

If your design permits, you change

public string[1,1] foo;
to
public string[][] foo;

--
HTH
Christoph Schittko [MVP, XmlInsider]
Software Architect, .NET Mentor

"cql60" <cq***@yahoo.com> wrote in message
news:eg**************@TK2MSFTNGP11.phx.gbl...
Hi all Pro,

I have the class call "Person", and I do declare two dimensional array

type
of string inside this class which will keep "First_Name" and "Last_Name"

as
the record. When I try to serialize it by using XMLSerializer, I got error like this:

An unhandled exception of type 'System.InvalidOperationException' occurred in system.xml.dll
Additional information: There was an error reflecting type
'WindowsApplication1.Array_Serialize'.

Does some Pro out there did encounter this problem before? I did try to
serialize with one dimensional array and it works fined, but not for two
dimensional array. May some Pro help please. Thanks you all in advance and I'm deeply appreciated for your help. Have a good one...

Kate


Nov 12 '05 #3
Kate,

The guys from the C# doc team explain it here [0].
Feel free to post of you have more questions.

--
HTH
Christoph Schittko [MVP, XmlInsider]
Software Architect, .NET Mentor

[0]
http://msdn.microsoft.com/library/en...asp?frame=true

"cql60" <cq***@yahoo.com> wrote in message
news:OH*************@TK2MSFTNGP11.phx.gbl...
Thanks you so much for your help, I'm deeply appreciated.

May you tell me how can I initialize my array? Have a nice weekend...

Cheers,

Kate

"Christoph Schittko [MVP]" <ch********************@austin.rr.com> wrote in
message news:OX*************@TK2MSFTNGP12.phx.gbl...
The XmlSerializer does not serialize multidimensional arrays. It does do
jaggedd arrays though.

If your design permits, you change

public string[1,1] foo;
to
public string[][] foo;

--
HTH
Christoph Schittko [MVP, XmlInsider]
Software Architect, .NET Mentor

"cql60" <cq***@yahoo.com> wrote in message
news:eg**************@TK2MSFTNGP11.phx.gbl...
Hi all Pro,

I have the class call "Person", and I do declare two dimensional array

type
of string inside this class which will keep "First_Name" and "Last_Name"
as
the record. When I try to serialize it by using XMLSerializer, I got error like this:

An unhandled exception of type 'System.InvalidOperationException' occurred in system.xml.dll
Additional information: There was an error reflecting type
'WindowsApplication1.Array_Serialize'.

Does some Pro out there did encounter this problem before? I did try
to serialize with one dimensional array and it works fined, but not for two dimensional array. May some Pro help please. Thanks you all in advance

and I'm deeply appreciated for your help. Have a good one...

Kate



Nov 12 '05 #4
Thanks you so much for your help, Christoph. I'm greatly appreciated. Have a
good one...

Kate

"Christoph Schittko [MVP]" <ch********************@austin.rr.com> wrote in
message news:OE****************@TK2MSFTNGP10.phx.gbl...
Kate,

The guys from the C# doc team explain it here [0].
Feel free to post of you have more questions.

--
HTH
Christoph Schittko [MVP, XmlInsider]
Software Architect, .NET Mentor

[0]
http://msdn.microsoft.com/library/en...asp?frame=true
"cql60" <cq***@yahoo.com> wrote in message
news:OH*************@TK2MSFTNGP11.phx.gbl...
Thanks you so much for your help, I'm deeply appreciated.

May you tell me how can I initialize my array? Have a nice weekend...

Cheers,

Kate

"Christoph Schittko [MVP]" <ch********************@austin.rr.com> wrote in
message news:OX*************@TK2MSFTNGP12.phx.gbl...
The XmlSerializer does not serialize multidimensional arrays. It does do jaggedd arrays though.

If your design permits, you change

public string[1,1] foo;
to
public string[][] foo;

--
HTH
Christoph Schittko [MVP, XmlInsider]
Software Architect, .NET Mentor

"cql60" <cq***@yahoo.com> wrote in message
news:eg**************@TK2MSFTNGP11.phx.gbl...
> Hi all Pro,
>
> I have the class call "Person", and I do declare two dimensional array type
> of string inside this class which will keep "First_Name" and "Last_Name" as
> the record. When I try to serialize it by using XMLSerializer, I got

error
> like this:
>
> An unhandled exception of type 'System.InvalidOperationException'

occurred
> in system.xml.dll
> Additional information: There was an error reflecting type
> 'WindowsApplication1.Array_Serialize'.
>
> Does some Pro out there did encounter this problem before? I did try to > serialize with one dimensional array and it works fined, but not for two > dimensional array. May some Pro help please. Thanks you all in

advance and
> I'm deeply appreciated for your help. Have a good one...
>
> Kate
>
>



Nov 12 '05 #5

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

Similar topics

2
by: ip4ram | last post by:
I used to work with C and have a set of libraries which allocate multi-dimensional arrays(2 and 3) with single malloc call. data_type **myarray =...
6
by: Ruben | last post by:
I'm trying to pass an array of string to a function without knowing how many strings I have beforehand. I've defined one functions as char * insert(char table,int cols, char values); out of...
16
by: rguti | last post by:
Hi, How do I create a two dimensional array? I have created a one dimensional doing this: Dim laFields As ArrayList = New ArrayList How about to do a 2 dimensional?
60
by: Peter Olcott | last post by:
I need to know how to get the solution mentioned below to work. The solution is from gbayles Jan 29 2001, 12:50 pm, link is provided below: >...
5
by: Diffident | last post by:
Hello All, I have a 2-dimensional array that I am storing as a session variable. I have no idea on how I can cast the session variable back to 2-dimensional array. Any pointers? Reference...
22
by: spam.noam | last post by:
Hello, I discovered that I needed a small change to the Python grammar. I would like to hear what you think about it. In two lines: Currently, the expression "x" is a syntax error. I suggest...
6
by: fniles | last post by:
I need to store information in a 2 dimensional array. I understand ArrayList only works for a single dimensional array, is that correct ? So, I use the 2 dimensional array like in VB6. I pass the...
8
by: per9000 | last post by:
Hi all, I have a two-dimensional array of data, f.x int's. We can imagine that the array is "really large". Now I want the data in it and store this in a one-dimensional array. The obvious...
272
by: Peter Olcott | last post by:
http://groups.google.com/group/comp.lang.c++/msg/a9092f0f6c9bf13a I think that the operator() member function does not work correctly, does anyone else know how to make a template for making two...
5
by: nelly0 | last post by:
developing a program that will manipulate noise levels (measured in decibels) that is collected by car manufacturers. These noise levels are produced at seven different speeds by a maximum of six...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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:
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.