About 582,000 results
Open links in new tab
  1. 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 …

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

  3. void in C# generics? - Stack Overflow

    Jul 3, 2012 · I have a generic method that takes a request and provides a response. public Tres DoSomething<Tres, Treq>(Tres response, Treq request) {/*stuff*/} But I don't always want a …

  4. C# Generics and Type Checking - Stack Overflow

    A great example of when this would be useful is generic serialization with wildly varying types. If the object being passed in is a string, why do the extra work?

  5. Java: Instanceof and Generics - Stack Overflow

    Oct 15, 2009 · Before I look through my generic data structure for a value's index, I'd like to see if it is even an instance of the type this has been parametrized to. But Eclipse complains when I …

  6. c# - What does an "in" generic parameter do? - Stack Overflow

    6 That signifies generic contravariance. The opposite is covariance (keyword out). What this means is that when an interface is contravariant (in), then the interface can be implicitly …

  7. 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?

  8. 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, …

  9. Creating a generic method in C# - Stack Overflow

    Jan 27, 2010 · I am trying to combine a bunch of similar methods into a generic method. I have several methods that return the value of a querystring, or null if that querystring does not exist …

  10. java - How to Map to Generic Type? - Stack Overflow

    Aug 5, 2019 · Mapstruct is a code generator. So it needs to know which types to construct in order to generate a method implementation. Having said that, you could do this smarter by using a …

Refresh