المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : Odd RuntimeBinderException



C# Programming
07-01-2012, 05:10 PM
I'm getting a very weird RuntimeBinderException that I cannot explain. I'm using .NET 4.0 and Workflow Foundation 4.0. The exception occurs when the workflow reaches an activity that uses the class that I assume is raising exception.

"The System.Datetime type cannot be implicitly converted to string".

The code never really reaches the method where the exception occurs (at least I assume it's this method as the console displays my own text that I write to the console in the catch block, though after changing the text it's the the old text I use) but rather seems to throw the exception before the method is actually called.

What's most confusing is that I don't really use any dynamics and made sure I don't implicitly convert a date to a string.

The System.Dynamics namespace is not used anywhere in the entire solution.

I use the SAP Business 1 RecordSet class, which has dynamics as fields, but this is the first time I get anything like this exception and I have been using them for months.

This is the code of the method: http://pastebin.com/FjxeXWB5[^ (http://pastebin.com/FjxeXWB5)]
This is the exception:http://i45.tinypic.com/mkhyde.png[^ (http://i45.tinypic.com/mkhyde.png)]

Thanks.