I have generated a class using XSD.EXE as per
http://dotnetjunkies.com/QuickStartv.../XSDToCls.aspx .
This has all worked well, and I inherrited this class into a new object on the web service where I have placed the methods to work with the data.
My intention was to cast the incomming xml object into my new inheritted class and work on it from there.
However I am getting a cast error when trying to cast to the inherrited class.
Quote:
quote:Unable to cast object of type 'RioInBound.ShipmentManifest' to type 'B2B.Rio.ShipmentManifest'.
|
Am I correct that I should be able to complete this cast.
eg
Code:
Class Dog: Animal{}
public void test(Animal animal)
{
Dog d = (Dog) animal;
}
And is there any reason why it wont work with XSD.EXE generated classes.
Many thanks in advance for any assistance
Rod
======================================
They say, best men are molded out of faults,
And, for the most, become much more the better
For being a little bad.
======================================