Table<T>() as a Property

Jun 10, 2010 at 3:50 PM

I know that this is a question of style and preference, but can we turn Table<T>() into a property? It makes sense semantically, since we really are accessing an object, and not using some method to generate/fetch the table.

 

Also, this has an implication for debugging -- you can't set watches on more than one call to Table<T>(), because it's a function call -- the other ones will grey out and you have to refresh if you want to see those again. Kinda annoying :)

 

 

Coordinator
Jul 3, 2010 at 5:54 PM

I finally got time to look into some of the requests (I have been working very long hours for a while).  There is not way to make it a generic property without making database class generic, such as.

Database<T1, T2, T3>{

public T1 Table1{get;}

}

 

This seems like a bad idea to me.

THanks

Sergey.