About 668,000 results
Open links in new tab
  1. Nullable type as a generic parameter possible? - Stack Overflow

    Oct 16, 2008 · The type 'int?' must be a non-nullable value type in order to use it as parameter 'T' in the generic type or method Is specifying a nullable type as a generic parameter at all possible?

  2. No generic implementation of OrderedDictionary? - Stack Overflow

    Apr 13, 2010 · 107 Implementing a generic OrderedDictionary isn't terribly difficult, but it's unnecessarily time consuming and frankly this class is a huge oversight on Microsoft's part. …

  3. c# - A generic error occurred in GDI+ - Stack Overflow

    A generic error occurred in GDI+ Asked 14 years, 4 months ago Modified 11 months ago Viewed 63k times

  4. What's the difference between "general" and "generic"?

    Apr 30, 2014 · Generic is the opposite of specific. Generic and specific refer to the identification of a fact. Specific means a fact that has been specified. If you ask for (specify) a pain reliever, …

  5. c# - Collection of generic types - Stack Overflow

    Nov 4, 2012 · 43 Have your generic class inherit from a non-generic base, or implement a non-generic interface. Then you can have a collection of this type and cast within whatever code …

  6. Cast to generic type in C# - Stack Overflow

    Jun 28, 2016 · The root issue mentioned above of casting a non-generic version of the class to a derived generic version was the same. In order to allow injection into a portable class library …

  7. 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<T> which I need to pass into a method that expects a Foo<Bar>. I can do the …

  8. Calling a static method on a generic type parameter

    Oct 13, 2008 · This answer cleverly "abuses" the somehow inconsistent rule, that you can, in your base class, create new objects of yet-unknown generic type, inheriting that base class - but you …

  9. 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 …

  10. C# generic type constraint for everything nullable

    Apr 11, 2017 · The first suggestion using is perfect! Now my template with a generic type being returned can return a null for objects and the default value for built-in types.