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

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

  3. 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, aspirin would …

  4. How do I get a class instance of generic type T? - Stack Overflow

    I have a generics class, Foo<T>. In a method of Foo, I want to get the class instance of type T, but I just can't call T.class. What is the preferred way to get around it using T.class?

  5. How to define generic type limit to primitive types?

    Apr 30, 2009 · I have the following method with generic type: T GetValue<T> (); I would like to limit T to primitive types such as int, string, float but not class type. I know I can define generic for clas...

  6. How to find reason for Generic GDI+ error when saving an image?

    Mar 22, 2013 · Having a code that works for ages when loading and storing images, I discovered that I have one single image that breaks this code: const string i1Path = @&quot;c:\\my\\i1.jpg&quot;; …

  7. 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 or is not in the

  8. A generic error occurred in GDI+, JPEG Image to MemoryStream

    Jun 27, 2009 · In the following code, the t.Save () method call throws our friend the generic exception when the pixel height is 65501 for me. For reasons of curiosity, I repeated the test for width, and the …

  9. What are the differences between "generic" types in C++ and Java?

    Java has generics and C++ provides a very strong programming model with templates. So then, what is the difference between C++ and Java generics?

  10. How to reference generic classes and methods in xml documentation

    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 types, ``n on …