Information générale
Catégorie:
Code, syntaxe and commandes
>In any .NET application where you are *only* accessing code *that you have written* would you use System.Reflection or System.CodeDom?
>
>That's a better question than you may think. ;-)
>
>For database work, I'd agree with Michel and use System.CodeDom wherever possible. That simple parser I mentioned earlier can convert VFP table-driven stuff to static C#. It's big, but it works.
If you're referring to Michel's post on this thread then I think he said the method *name* was stored in a table - so he wasn't compiling on the fly. But that implies that the required method already exists in a known object (and presumably all of the possilbe methods have the same parameters and return type) so you don't *need* to use reflection as the solution. Not saying that it is neccessarily a bad solution - just that there are alternatives.....
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