I have asked this before but I didn’t get the question right so the answer was missed.
If I have a method that returns an ObservableColletion<T> how would I then use this in another generic method.
Would
method2<ObservableCollection<T>>(){}
be the way to go.
I am trying to make a generic resultEventArgs that will pass the results of an Ado.NET Dataservices query to all subscribers. Inside that I want ot be able to pass the strongly typed EntityCollection that is returned [Ado.NET 1.5 generated]
So yes, my question is worded ObservableCollection because i didn’t want to get the whole ado.net dataservices confusion.
Cheers
Dave
It depends; do you want to specify the item type, or the collection type? If you just want to specify the item, then the
Trelates just to the item:Then you can use
ObservableCollection<Order> orders = SomeMethod<Order>()etc. If you need to specify the collection type, you may need more generic types…However, calling it is trickier. It can’t do type inference unless the list is an argument, meaning you have to specify both
TListandTwhen calling it… not pretty.