No announcements
Found 2716884 threads
-
3 Votes
Generic method using delegates
Create an empty interface and let both of your classes implement that, public interface ICommon { } class Form : ICommon class Course : ICommon { ...Answered | 6 Replies | 696 Views | Created by SaranRam - Tuesday, November 12, 2013 9:55 AM | Last reply by Adavesh - Tuesday, November 12, 2013 3:47 PM -
0 Votes
generic method as extension method
I am actually calling the method, whereas you are not calling the method.Answered | 4 Replies | 2900 Views | Created by Schwartzberg - Wednesday, February 25, 2009 2:41 PM | Last reply by Schwartzberg - Wednesday, February 25, 2009 5:46 PM -
0 Votes
Differences between method overloading and Generics
Hi, It appears there is no relation between method overloading and Generics.Answered | 4 Replies | 7845 Views | Created by srkvellanki - Monday, April 20, 2009 4:38 PM | Last reply by DeborahK - Friday, April 24, 2009 3:02 PM -
2 Votes
It is possible to call a method on a generic type parameter
Hi Simone, How is it going now with our friends' suggestion?Answered | 9 Replies | 24074 Views | Created by Simone78GE - Thursday, January 26, 2012 8:04 PM | Last reply by Leo Liu - MSFT - Wednesday, February 1, 2012 10:20 AM -
1 Votes
General Method PreprocessQuery
The preprocessquery method on queries is intended for applying additional filtering (by means of where classes) on an entity.Answered | 1 Replies | 692 Views | Created by Kdraper - Thursday, May 16, 2013 1:43 PM | Last reply by Paul Van Bladel - Thursday, May 16, 2013 5:41 PM -
0 Votes
EF - Generic save method
Hi, I'm trying to save objects to a database using EF6 with a generic method.Answered | 2 Replies | 870 Views | Created by AsusT9 - Monday, May 29, 2017 10:45 AM | Last reply by Wendy Zang - Tuesday, May 30, 2017 1:59 AM -
0 Votes
How to use ananomous class with method takes generic class
What if we passed the T type into the generic method or extension method?Answered | 11 Replies | 2794 Views | Created by jdang - Monday, August 10, 2009 3:03 PM | Last reply by Michael Sun [MSFT] - Tuesday, August 11, 2009 7:50 AM -
0 Votes
Extension method, SumIf on generic List<T>
A generic "SumIf" would probably take a predicate, and look something like: public static double SumIf(this IEnumerable<T> collection, Func<T, bool> ...Answered | 2 Replies | 3736 Views | Created by mort strom - Saturday, March 17, 2012 11:12 PM | Last reply by Reed Copsey, Jr - Sunday, March 18, 2012 12:31 AM -
0 Votes
How to define the Complexity ?
In General I have to define the Complexity (in Terms of Simple , Medium,Complex) Hope this will help you !!!Answered | 7 Replies | 2590 Views | Created by Sanjeewan Kumar - Monday, January 23, 2012 10:16 AM | Last reply by Kalman Toth - Friday, January 27, 2012 3:31 PM -
0 Votes
Lightswitch 2013 data source general methods missing
I was pointing to tables that didn't have primary keys defined.Answered | 2 Replies | 574 Views | Created by TariqAnjum - Wednesday, June 11, 2014 1:41 PM | Last reply by TariqAnjum - Friday, June 13, 2014 8:16 AM -
0 Votes
Dynamic analysis of the contracts defined on a method by an invoking application.
Is there a way for an external application to discover and enumerate the contracts defined on a class/method/property dynamically at runtime?Answered | 1 Replies | 4815 Views | Created by McLellan - Friday, March 6, 2009 11:04 PM | Last reply by Manuel Fahndrich - Sunday, March 8, 2009 6:56 PM -
0 Votes
Defining generic classes with the same name and different number of type arguments
Try defining your classes in different pairs of .h and .cpp files.Answered | 2 Replies | 2091 Views | Created by Idisis - Monday, August 20, 2012 12:39 PM | Last reply by Viorel_ - Monday, August 20, 2012 7:36 PM -
0 Votes
Overload of methods in generic classes under C#
I don't see yet how you get to run the appropiate method without an explicit cast to IBar#... maybe it'll click later.Answered | 10 Replies | 3740 Views | Created by Loïc Morvan - Wednesday, July 15, 2009 12:20 PM | Last reply by Rudedog2 - Thursday, July 16, 2009 10:15 PM -
0 Votes
Creating Generic Search Method
Hi There, It is possible to create a generic search method where key is unknown; for e.g Key for the List<T> will be passed to the parameter and it performs ...Answered | 2 Replies | 345 Views | Created by AbhinawK - Wednesday, August 24, 2016 9:57 AM | Last reply by Stefan Hoffmann - Wednesday, August 24, 2016 11:16 AM -
0 Votes
Methods with 2 generic types in class with 1 generic type
So the generics approach can only work with this concrete class.Answered | 1 Replies | 664 Views | Created by MDMoura - Friday, July 8, 2016 7:37 PM | Last reply by Stefan Hoffmann - Saturday, July 9, 2016 9:39 PM -
1 Votes
Returning a Generic Type from a Method
Generics can be used on return types as well as parameters: public static T GetRatePropertyValue<T> ...Answered | 3 Replies | 3217 Views | Created by Robert Werner - Monday, October 18, 2010 9:59 PM | Last reply by Mike Dos Zhang - Wednesday, October 20, 2010 8:52 AM -
0 Votes
How to get local variable names defined in a method using reflection in C#.net
"But again how do i map this information with the information(LocalVariables defined in a method)" With SymReader the locals can be found via ...Answered | 7 Replies | 8469 Views | Created by RK Engineer - Friday, May 10, 2013 9:55 AM | Last reply by Brian Reichle - Thursday, June 7, 2018 10:00 PM -
1 Votes
Pass generic in method parameter?
I did move the type parameter from the method Calculate to the interface IFitness, which is usually (but not always) a better match to requirements.Answered | 3 Replies | 1011 Views | Created by wapt49 - Sunday, December 9, 2012 2:30 PM | Last reply by Pieter Geerkens - Sunday, December 9, 2012 3:17 PM -
3 Votes
[U8.1][VB]Generic Methods for an Array of Arrays
When you remove the generic type parameter the array is now strongly typed.Answered | 10 Replies | 676 Views | Created by Nathan Sokalski - Thursday, June 25, 2015 2:46 AM | Last reply by Nathan Sokalski - Saturday, June 27, 2015 2:44 PM -
0 Votes
How to find objects in Generics with List.Find() method
You need to make your GetEnumerator() methods public.Answered | 2 Replies | 3285 Views | Created by manju.inform - Wednesday, November 10, 2010 7:35 AM | Last reply by Phillip Marino - Thursday, November 11, 2010 9:18 PM
No announcements