Click here to Skip to main content
15,891,184 members
Home / Discussions / C#
   

C#

 
QuestionPlaying a sound using Media.Soundplayer() Pin
QzRz20-Dec-06 2:04
QzRz20-Dec-06 2:04 
QuestionInternationalize the application Pin
AcDev720-Dec-06 2:03
AcDev720-Dec-06 2:03 
AnswerRe: Internationalize the application Pin
Netricity20-Dec-06 11:40
Netricity20-Dec-06 11:40 
QuestionFinding controls inside a region ? Pin
kkadir20-Dec-06 1:51
kkadir20-Dec-06 1:51 
Questionuploaf files using desktop applications Pin
Mridang Agarwalla20-Dec-06 1:15
Mridang Agarwalla20-Dec-06 1:15 
AnswerRe: uploaf files using desktop applications Pin
Eitsop20-Dec-06 2:37
Eitsop20-Dec-06 2:37 
GeneralRe: uploaf files using desktop applications Pin
Mridang Agarwalla20-Dec-06 9:36
Mridang Agarwalla20-Dec-06 9:36 
QuestionXmlSerialier reflection error ?? Pin
babbelfisken20-Dec-06 1:00
babbelfisken20-Dec-06 1:00 
Hi!

Basically i want to serialize an array of objects Booking.
That class has public fields of basic types like string,int.
A very simple class containg information of the booking.

I have managed to serialize/deserilize the array before but when
i added a public field object of type 'MyButton' which inherits the System.Windows.Forms.Button class i got Reflection error of type Booking[] ?

I tried using an [XmlIgnore] on the object not to serializr this but it doesn't work.

Booking class:
<br />
<br />
string name;<br />
...;<br />
...;<br />
<br />
public Booking(string name,...,...)<br />
{<br />
  this.name = name;<br />
  ...;<br />
  ...;<br />
<br />
  myButton = new MyButton();<br />
}<br />
<br />
...;<br />
<br />


I have a booking manager class that takes care of every booking and also instantiate the xmlSerializer object with the following line

<br />
xmlSer = new XmlSerializer(typeof(Booking[]));<br />


As I said, it worked fine until I added the MyButton object to the Booking class!

Why can't I add an object to my class with the property of XmlIgnore on it and serialize that object ?

Can't get a grip of what reflection error really means too!

Thankful for suggestion on how to solve this. I want to use this XmlSerializer cause it makes the job a lot easier but if i cant workaround this problem I may have to build an xmldocument by hand and save it and i try to avoid it.
AnswerRe: XmlSerialier reflection error ?? Pin
Eitsop20-Dec-06 2:42
Eitsop20-Dec-06 2:42 
GeneralRe: XmlSerialier reflection error ?? Pin
babbelfisken20-Dec-06 3:05
babbelfisken20-Dec-06 3:05 
GeneralRe: XmlSerialier reflection error ?? Pin
Eitsop20-Dec-06 4:09
Eitsop20-Dec-06 4:09 
GeneralRe: XmlSerialier reflection error ?? Pin
babbelfisken20-Dec-06 6:54
babbelfisken20-Dec-06 6:54 
GeneralRe: XmlSerialier reflection error ?? Pin
Member 1488660210-Jul-20 20:35
Member 1488660210-Jul-20 20:35 
AnswerRe: XmlSerialier reflection error ?? Pin
DavidNohejl21-Dec-06 0:34
DavidNohejl21-Dec-06 0:34 
QuestionNo Dll dependant Pin
overfreeze20-Dec-06 0:29
overfreeze20-Dec-06 0:29 
AnswerRe: No Dll dependant Pin
beatles169220-Dec-06 2:18
beatles169220-Dec-06 2:18 
Questioncheck for connection establishment using .Net Remoting Pin
Praveen Raghuvanshi20-Dec-06 0:19
professionalPraveen Raghuvanshi20-Dec-06 0:19 
QuestionStack Class Pin
saymajum20-Dec-06 0:10
saymajum20-Dec-06 0:10 
AnswerRe: Stack Class Pin
althamda20-Dec-06 0:12
althamda20-Dec-06 0:12 
GeneralRe: Stack Class Pin
ednrgc20-Dec-06 7:25
ednrgc20-Dec-06 7:25 
AnswerRe: Stack Class Pin
stancrm20-Dec-06 0:23
stancrm20-Dec-06 0:23 
AnswerRe: Stack Class Pin
User 665820-Dec-06 2:10
User 665820-Dec-06 2:10 
Questionreference to webservice Pin
fmardani19-Dec-06 23:45
fmardani19-Dec-06 23:45 
AnswerRe: reference to webservice Pin
Chris Buckett22-Dec-06 2:58
Chris Buckett22-Dec-06 2:58 
QuestionHow to show a form in another form(not using mdiParent property ) or another control and get events (i.e activated, enter)? Pin
joeblack_mysterious19-Dec-06 23:38
joeblack_mysterious19-Dec-06 23:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.