473,395 Members | 2,468 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,395 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 4645
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...
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
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
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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...

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.