Does anyone have any idea on this, I have the following code in c#
value and property are recieved asCode:value = Convert.ChangeType(value, property.PropertyType);
value is an objectCode:PropertyInfo property, object value
property.PropertyType is a type
Everything worked fine but is failing when value = "1234.56" and the property.PropertyType is an int.
It is part of some code that I have to dynamically load data into a class from a csv file, using attributes to define what type of data to insert etc.


Just chill
Reply With Quote

Bookmarks