About 687,000 results
Open links in new tab
  1. How to register dependency injection with generic types? (.net core)

    May 23, 2019 · How to register dependency injection with generic types? (.net core) Asked 6 years, 6 months ago Modified 4 years, 2 months ago Viewed 77k times

  2. Create Generic method constraining T to an Enum

    Sep 17, 2008 · Please note though that you can't use generic restriction like where T : Enum because Enum is special type. Therefore I have to check if given generic type is really enum.

  3. How to reference generic classes and methods in xml …

    For this reason, you'll have to use the special "ID string" syntax that applies in such files: always use fully-qualified identifiers, and use backticks to reference generic type parameters (`n on …

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

    Mar 26, 2015 · Note about the placing of the function parameter list When using a Generic() to select a function based on the controlling-expression you have the choice of including the …

  5. How to fix Git for Windows keeps asking for Github credentials

    Apr 6, 2023 · For github we want the github provider, Bitbucket has a bitbucket provider and there is a generic one for normal use. So to setup for generic as the default and use the github …

  6. Generic Property in C# - Stack Overflow

    Jul 5, 2011 · Possible Duplicate: Making a generic property I'm not quite sure how to do that, but what I would like to do is to create a special type of property that will perform specific tasks at …

  7. Using a 'using alias = class' with generic types? [duplicate]

    using LookupDictionary = System.Collections.Generic.Dictionary<string, int>; Now I want to accomplish the same with a generic type, while preserving it as a generic type:

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

  9. How do you provide a default type for generics? - Stack Overflow

    Jul 8, 2009 · The generic parameter type will be the same for all methods, so I would like it at the class level. I know I could make a generic version and then inherit from it for the int version, …

  10. How can I return NULL from a generic method in C#?

    I think the problem with this is that if you're using this generic method to say, convert a Database object from DbNull to Int and it returns default (T) where T is an int, it'll return 0. If this number …