472,993 Members | 2,204 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Help with error CS0030: Cannot convert type

Hi,

When trying to serialize a class I keep getting the message below.
optionalExtensionTypeOptionalExtension is not mandatory so not sure
why this is appearing.

If anyone has seen this type of error before and found a way around
it, it would be greatly appreciated.

error CS0030: Cannot convert type
'Confused.HomeInsurance.BOB.AIG.CDLService.optiona lExtensionTypeOptionalExtension[]'
to
'Confused.HomeInsurance.BOB.AIG.CDLService.optiona lExtensionTypeOptionalExtension'
Thanks in advance
Aug 15 '08 #1
2 4598
It sounds like there is a mismatch between an array and a single
instance... while it may be optional, if some data is found it expects
to understand it.

Which serializer are you using, btw?

We're not going to be able to offer much help without a bit more info
on how this is all declared...

Marc
Aug 15 '08 #2
On Aug 15, 3:24*pm, Marc Gravell <marc.grav...@gmail.comwrote:
It sounds like there is a mismatch between an array and a single
instance... while it may be optional, if some data is found it expects
to understand it.

Which serializer are you using, btw?

We're not going to be able to offer much help without a bit more info
on how this is all declared...

Marc
Hi Marc,

I am using the frameworks XmlSerializer. Although this is optional I
have tried to initialise an instance of the array i.e.
optionalExtension = new optionalExtensionTypeOptionalExtension[] (new
optionalExtensionTypeOptionalExtension()); to see if that works but
still no joy. I have only been doing C# for about a month so
apologise if I'm not more specific.

Appreciate your help
Aug 16 '08 #3

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

Similar topics

0
by: Jill Graham | last post by:
Hi, From time to time, I receive following error message when trying to access my website. When the error occurs, I have to recompile my dll until the error disappears (this without changing...
3
by: Drewdog | last post by:
I am getting some error messages which I can't figure out their meaning. I have the code setup, I think it's correct but it doesn't work. My goal is to get this program to read from a data file and...
1
by: Jill Graham | last post by:
Hi, From time to time, I receive following error message when trying to access my website. When the error occurs, I have to recompile my dll until the error disappears (this without changing...
2
by: keithb | last post by:
A web site published from its development environment (VS Web Server) to an IIS 6.0 site displays this message: Compiler Error Message: CS0030: Cannot convert type 'ASP.login_aspx' to...
1
by: keithb | last post by:
This application works without error in the development environment using the VS web server. When I publish the site to my IIS 6.0 server, I get this error at runtime when I open the Change...
3
by: WayDownUnder | last post by:
Hello , When I run my application in Visual Studion everthing works ok. But when I publish to our web server i get the error Compiler Error Message: CS0030 I am trying to open a popUP window...
2
by: teddybyte | last post by:
my script below is: #include "stdafx.h" int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, ...
0
by: Pucca | last post by:
Hi I'm using vs2005. I am getting a bunch of compiler warnings after I made some changes to my code that was compiling clean. I'm also getting memory errors when I run my program and it's...
0
by: gunimpi | last post by:
http://www.vbforums.com/showthread.php?p=2745431#post2745431 ******************************************************** VB6 OR VBA & Webbrowser DOM Tiny $50 Mini Project Programmer help wanted...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
4
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

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.