A Miscellaneous Sort Of Day

by Codewiz51 3. September 2008 21:32

I spent the day calling potential clients in various public agencies, trying to establish some contacts. I like this part of my work. I enjoy selling Southwest Research Institute services and capabilities. Our organization has a lot of resources that enable us to carry out a lot of practical/applied R & D work.

I also spent some time honing my skills in class serialization techniques using C#. I ran into a gotcha, otherwise this would be a really boring blog entry. This is a code fragment from the XMLAttributeOverrides documentation that I was experimenting on:

/* Create an XmlElementAttribute to override the
field that returns Instrument objects. The overridden field
returns Brass objects instead. */
XmlElementAttribute attr = new XmlElementAttribute();
attr.ElementName = "Brass";
attr.Type = typeof(Brass);

// Add the element to the collection of elements.

// Create the XmlAttributeOverrides object.
XmlAttributeOverrides attrOverrides = new XmlAttributeOverrides();

/* Add the type of the class that contains the overridden
member and the XmlAttributes to override it with to the
XmlAttributeOverrides object. */
attrOverrides.Add(typeof(Orchestra), "Instruments", attrs);


Tags: , ,



This blog represents my personal hobby, observations and views. It does not represent the views of my employer, clients, especially my wife, children, in-laws, clergy, the dog, the cats or my daughter's horse. In fact, I am not even sure it represents my views when I take the time to reread postings.

© Copyright 2008-2011