About 726,000 results
Open links in new tab
  1. Syntax and Sample Usage of _Generic in C11 - Stack Overflow

    Mar 26, 2015 · Note about the placing of the function parameter list When using a Generic() to select a function based on the controlling-expression you have the choice of including the …

  2. Using a 'using alias = class' with generic types? [duplicate]

    using List<T> = System.Collections.Generic.List<T>; But that doesn't compile, so is there any way to achieve creating this alias while leaving the type as generic?

  3. How can I pass in a func with a generic type parameter?

    Mar 24, 2014 · You can certainly define generic delegates, after all, that's exactly what Func and Action are. They are treated as generic definitions, just like generic interfaces and classes are. …

  4. Is generic constructor in non-generic class supported?

    Jul 29, 2015 · One remark -- constructor in generic class is generic, because the class is generic. However (taking your answer) it cannot specify extra generic arguments. Thank you for very …

  5. Using Mockito to mock classes with generic parameters

    Is there a clean method of mocking a class with generic parameters? Say I have to mock a class Foo&lt;T&gt; which I need to pass into a method that expects a Foo&lt;Bar&gt;. I can do the …

  6. Passing arguments to C# generic new () of templated type

    Passing arguments to C# generic new () of templated type Asked 16 years, 6 months ago Modified 1 year, 11 months ago Viewed 273k times

  7. c# - How to compare values of generic types? - Stack Overflow

    So, two questions: Why do we observe this weird behaviour? What keeps us from comparing the values of generic types which are known to be IComparable? Doesn't it somehow defeat the …

  8. java - Get generic type of class at runtime - Stack Overflow

    Aug 4, 2010 · 0 If you cannot change the generic class and use one of the method already explained on this page, then simple approach would be to get the type class based on the …

  9. How to get the type of T from a member of a generic class or …

    This appears to address the question of whether the type is a list-y sort of thing, but the question is more about how to determine what generic type parameter a type that is known to be a List …

  10. How do I make the return type of a method generic?

    Is there a way to make this method generic so I can return a string, bool, int, or double? Right now, it's returning a string, but if it's able find "true" or "false" as the configuration value, I'd like …