Hi,
I'm currently working on a function which reads an xml file and automatically checks whether the information in this file may be used or not. If it finds a row which cannot be used it will automatically replace this row by a default row which is hardcoded into the program.
My problem is, that I don't want to put the color codes as strings into my DataTable but convert them to actual Colors right away. This succeeds but when I try to cast the color out of the DataTable it fails and I don't see why because I have seen this in several examples.
The program does the following:
String -> Hex -> Color -> Save into DataTable -> Cast as Color
and the last step fails. Does anyone know why and how I can fix this?
best regards
Cyclonit
I'm currently working on a function which reads an xml file and automatically checks whether the information in this file may be used or not. If it finds a row which cannot be used it will automatically replace this row by a default row which is hardcoded into the program.
My problem is, that I don't want to put the color codes as strings into my DataTable but convert them to actual Colors right away. This succeeds but when I try to cast the color out of the DataTable it fails and I don't see why because I have seen this in several examples.
The program does the following:
String -> Hex -> Color -> Save into DataTable -> Cast as Color
and the last step fails. Does anyone know why and how I can fix this?
best regards
Cyclonit
Comment