John Baird
Coatesville, Pennsylvanie, États-Unis
Versions des environnements
Network:
Windows 2008 Server
>>>In the validate generic method I create a list of T rows that get passed into the validate column functionality. The validate columns then passes this generic collection to a couple of tryConvert routines depending on data type.
>>>
>>>The problem is that I can send the rows collection to the TryConvertValue method just fine and it runs perfectly. I send the same collection with the same parameters into TryValidateStringLength, and I get the following compile time error:
>>>
>>>"Argument type 'System.Collections.Generic.IEnumerable(T)' is not assignable to parameter type 'System.Collections.Generic.IEnumerable(T)'
>>>
>>>This editor strips generic symbols from the code, so I'm attaching png's of the methods..
>>
>>You missed the 'T' when defining the TryValidateStringLength method (The red T in the first parameter should have been a clue :-})
>
>Thanks. You don't know how long I stared at those two functions never noticing the missing T. Thanks again. That's what I get for programming at work all day and at home most of the night...
Know the feeling ; made the same mistake :-{
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement