I've create a query depending on a type chosen from a Combobox.
So is it possible to create a variable and then use it like this:
??? T = chosen_entity.GetType();
IQueryable
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Danatas GerviPosted Aug 5, 2009, 10:32 AM
May be this is what you want....
Danatas GerviPosted Aug 4, 2009, 12:41 PM
I think, not.
The reason – when you write code, C# syntax allow to use "T" as future concrete type.
But compiler must know, witch type it is now.
Type T = someObject.GetType();
T can get exact value only in runtime…
May be somebody will explain better then me…