Explained below in the code snippet, I can't figure out the syntax for this:
object tcsObject = new TaskCompletionSource<Apple>();
Apple apple = new Apple();
// How do I do this?
TaskCompletionSource<apple.GetType>() tsc = tscObject as TaskCompletionSource<apple.GetType>()
edit Should note the particular issue I am trying to figure is how to do this generics cast without initially knowing that the the type is Apple. The type could end up being anything, so I am looking to do this operation from what is returned via GetType.