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

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

  3. Nullable type as a generic parameter possible? - Stack Overflow

    Oct 16, 2008 · Multiple generic constraints can't be combined in an OR fashion (less restrictive), only in an AND fashion (more restrictive). Meaning that one method can't handle both …

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

    @gstercken: One problem with IComparable overloading the comparison operators is that there are situations where X.Equals(Y) should return false, but X.CompareTo(Y) should return zero …

  5. C# Get Generic Type Name - Stack Overflow

    Note that this does not work for arrays of generic types, they have names such as MyType`1[] and thus the trailing array brackets [] will be removed by friendlyName.Remove(iBacktick);. You …

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

  7. exception - Generic catch for python - Stack Overflow

    Jan 14, 2009 · Python Generic Exception to Catch Rest Of Errors. 0. Python catch exception. 4.

  8. How do I get the type name of a generic type argument?

    This extension method outputs the simple type name for non-generic types, and appends the list of generic arguments for generic types. This works fine for scenarios where you don't need to …

  9. C# Generic constraints to include value types AND strings

    Jan 5, 2012 · No, you can't. Generic constraints are always "AND"-ed, if you see what I mean (i.e. all constraints must be satisifed), so even if you were trying to use some unsealed class, this …

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

    This may not be a best practice but it worked for me. This method takes in an array of generic type and a value to add to the end of the array. The array is then copied with the first value …

Refresh