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

  2. C# Generics and Type Checking - Stack Overflow

    In case you happen to have a generic method that returns a generic value but doesn't have generic parameters, you can use default(T) + (T)(object) cast, together with C# 8 pattern …

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

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

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

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

    Mar 24, 2014 · You cannot have instances of generic functions or actions - all type parameters are defined upfront and cannot be redefined by the caller. An easy way would be to avoid …

  7. Syntax and Sample Usage of _Generic in C11 - Stack Overflow

    Mar 26, 2015 · Generic selection is implemented with a new keyword: _Generic. The syntax is similar to a simple switch statement for types: _Generic( 'a', char: 1, int: 2, long: 3, default: 0) …

  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 type conversion FROM string - Stack Overflow

    I have a class that I want to use to store "properties" for another class. These properties simply have a name and a value. Ideally, what I would like is to be able to add typed properties, so that...

  10. What is the difference between "universal" and "generic"?

    Jun 6, 2014 · Outside of software, generic is usually used in contrast to trademark names. One speaks of generic drugs, for instance, to refer to drugs not produced by the original maker / …

Refresh