About 586,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. 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 …

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

  4. Using List<T> in C# (Generics) - Stack Overflow

    Oct 2, 2013 · That's not how generics work. MyMethod(List<T> list) is an invalid method signature (unless your class is a generic class with a Type Parameter T)

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

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

  7. c# - Generics used in struct vs class - Stack Overflow

    Dec 6, 2012 · Assume that we have the following struct definition that uses generics: public struct Foo&lt;T&gt; { public T First; public T Second; public Foo(T first) { this.First = f...

  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. How to determine the class of a generic type? - Stack Overflow

    Oct 8, 2008 · I'm creating a generic class and in one of the methods I need to know the Class of the generic type currently in use. The reason is that one of the method's I call expects this as …

  10. Array<Type> VS Type[] in Typescript - Stack Overflow

    Apr 25, 2016 · There isn't any semantic difference There is no difference at all. Type[] is the shorthand syntax for an array of Type. Array<Type> is the generic syntax. They are …

Refresh