iconvertible

MySQL Data Provider - Unable to cast object of type 'System.Byte[]' to type 'System.IConvertible'.

I'm having some difficulty with my Entity Framework context that is proving very troublesome to debug. I added a feature to my application yesterday that gave one of my entities an additional collection of child entities (called Models) and after updating one of my expressions to Include() that collection when I query for the parent obje...

How to check if two types can be compared, summed etc.?

Hi, if given two types (Type a, Type b), is there any "nice" way to find out if those two can be compared, summed etc.? I was thinking if the types implement IConvertible, one could convert both to lets say decimal and perform a "Convert.ToDecimal(a) > Convert.ToDecimal(b)" ? I am building an expression evaluator and want to be able to...

Object must implement IConvertible?

Getting this after solving a "Error converting data type nvarchar to datetime" error. Using Vb.net/SQL Server 2000 updating a row via a gridview/sqldatasource: Stored Procedure: @ISTag varchar(10), @PCISTag varchar(10), @User varchar(50), @Date_Start datetime, @Date_End datetime, @Status varchar(50), @Cost money, @Notes varchar(500), @...

Why does Convert.ChangeType take an object parameter?

The Convert class has been in existence since .NET 1.0. The IConvertible interface has also existed since this time. The Convert.ChangeType method only works on objects of types that implement IConvertible (in fact, unless I'm mistaken, all of the conversion methods provided by the Convert class are this way). So why is the parameter ty...

"could not instantiate" NHibernate.QueryException Raise By Combined Linq Query

Hello, Executing the following NHibernate.Linq statement raises a "could not instantiate: Reservation001.Services.ReservationDto" NHibernate.QueryException containing an inner InvalidCast exception ("Object must implement IConvertible."): var inOneStep = (from r in session.Linq<Models.ReservationHeader>() select new ReservationDto(...