Tech Off Post

Single Post Permalink

View Thread: What's the name of this (lacking?) C# language feature and why isn't it possible or is it?
  • User profile image

    The problem I'm trying to solve is:

    I use a serialization lib which wants this:

    public static void Serialize<T>(Stream destination, T instance);

    and I want to call Serialize(stream, ????);

    Such that the ???? part is not manually typed in but inferred from the type of the list variable.

    How to do this?