No announcements
Found 2280923 threads
-
0 Votes
Generic parameters and interfaces
In .NET 4, many generic types are covariant or contravariant.Answered | 13 Replies | 2861 Views | Created by confused and lost - Tuesday, October 18, 2011 10:29 PM | Last reply by confused and lost - Thursday, October 27, 2011 10:01 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 | 1007 Views | Created by wapt49 - Sunday, December 9, 2012 2:30 PM | Last reply by Pieter Geerkens - Sunday, December 9, 2012 3:17 PM -
0 Votes
Interfaces and generics
So this is by design, as far as I know, there is no any workaround for this problem.Answered | 3 Replies | 773 Views | Created by Crispy76 - Tuesday, October 6, 2015 7:28 AM | Last reply by Kristin Xie - Wednesday, October 14, 2015 8:11 AM -
2 Votes
It is possible to call a method on a generic type parameter
This method is only known at runtime after the generic type is reified to, e.g.Answered | 9 Replies | 24050 Views | Created by Simone78GE - Thursday, January 26, 2012 8:04 PM | Last reply by Leo Liu - MSFT - Wednesday, February 1, 2012 10:20 AM -
2 Votes
How to write generic methods in the interface?
Get and Set are verbs which should be only used for explicit getter/setter methods of properties.Answered | 7 Replies | 687 Views | Created by HZ.USA - Thursday, December 17, 2015 12:30 AM | Last reply by Mauricio Feijo - Thursday, December 17, 2015 4:58 PM -
1 Votes
Contracts for Generic Parameters in Abstract Methods
Well, the problem is in the method DelegateValidate<T>(Super<T> s, T data).Answered | 4 Replies | 4940 Views | Created by Dave Sexton - Monday, October 5, 2009 6:28 AM | Last reply by Dave Sexton - Friday, October 23, 2009 5:24 AM -
1 Votes
Using Generics with an interface
Hi WIJ, Here we should distinguish between Generic Methods and Generic Classes/Interfaces, and have a ...Answered | 2 Replies | 2227 Views | Created by WIJ - Tuesday, February 14, 2012 2:47 PM | Last reply by Leo Liu - MSFT - Thursday, February 16, 2012 7:46 AM -
0 Votes
Calling methods with a generic parameter using funceval in Mdbg
Hi Darius, to call a function with generics parameter you will need to use ICorDebugEval2 interface.Answered | 2 Replies | 6238 Views | Created by Darius R - Thursday, October 7, 2010 2:41 PM | Last reply by eryang - Monday, October 25, 2010 2:58 AM -
0 Votes
Parameter Generation with Adapter Objects
In general, you can only use value types (primitive type, structs and CompoundValue) as the parameters, but as I mentioned, if you do not want to change the interface, ...Answered | 6 Replies | 6904 Views | Created by ne0sonic - Wednesday, January 12, 2011 3:58 PM | Last reply by Xiang Li - Thursday, January 13, 2011 3:28 PM -
0 Votes
Interface Generic
If you make it return a T instead, members of T become available: interface IUpdatable<T> where T : IUpdater<T> ...Answered | 2 Replies | 3345 Views | Created by Me_Titus - Monday, March 14, 2011 1:48 PM | Last reply by Me_Titus - Monday, March 14, 2011 2:25 PM -
1 Votes
When To Use Generic Types At Class/Interface versus Method?
If a method, and only that method, dynamically adapts to the type, pass it to the method.Answered | 5 Replies | 1754 Views | Created by HuffCAD - Wednesday, October 24, 2012 8:20 PM | Last reply by HuffCAD - Friday, October 26, 2012 12:07 PM -
0 Votes
A generic argument must be provided for each generic parameter
I came across this problem too.Answered | 5 Replies | 6027 Views | Created by Software dude - Tuesday, August 26, 2008 6:05 PM | Last reply by davidbarrett - Tuesday, March 31, 2009 9:50 PM -
2 Votes
C# Method Generic Params Parameter Bug?
It also has something to do with how the compiler generates IL for generic types.Answered | 9 Replies | 5420 Views | Created by Michal Marynowski - Tuesday, May 18, 2010 9:43 AM | Last reply by Michal Marynowski - Wednesday, May 19, 2010 8:14 AM -
1 Votes
Generic method and overload resolution
I don't have a problem with the design decision.Answered | 9 Replies | 4238 Views | Created by Louis.fr - Tuesday, June 22, 2010 4:26 PM | Last reply by Louis.fr - Thursday, June 24, 2010 12:46 AM -
0 Votes
Generic collections and Interfaces
But the fact is that it could be cast back to it's concrete type means you would have all sorts of problems.Answered | 6 Replies | 594 Views | Created by Ethan Strauss - Thursday, January 16, 2020 5:45 PM | Last reply by Ethan Strauss - Friday, January 17, 2020 6:05 PM -
0 Votes
svcutil /async generates async method but does not include it in the interface
Only the callback/delegate-based asynchronous methods are included in the generated interface.Answered | 2 Replies | 5780 Views | Created by Pritesh3 - Wednesday, August 29, 2012 10:01 AM | Last reply by neologiker - Tuesday, April 30, 2013 9:23 PM -
0 Votes
IDbSet non-generic interface ?
Hi Graham, We originally didn't implement IDbSet because it caused issues with the compiler when DbSet<T> used to inherit from DbSet (you ...Answered | 1 Replies | 5471 Views | Created by Graham Hay - Thursday, March 3, 2011 3:50 PM | Last reply by Rowan Miller - Wednesday, March 9, 2011 9:23 PM -
1 Votes
Generics using in method parameter
} class ...Answered | 3 Replies | 2552 Views | Created by Kim KiSong - Friday, November 12, 2010 2:32 AM | Last reply by Rudedog2 - Friday, November 12, 2010 11:19 PM -
0 Votes
Generic Interface Issue
Both @Viorel and @Zhanglong gave good generic examples of how to do this.Answered | 10 Replies | 729 Views | Created by JuanC_LopGar97 - Wednesday, February 6, 2019 4:32 AM | Last reply by ritehere44 - Thursday, February 7, 2019 5:27 AM -
1 Votes
Using Generics With Interfaces
By the way, use "where T : blah" is a Generic Constraint.Answered | 3 Replies | 3059 Views | Created by Zane Kaminski - Wednesday, October 29, 2008 10:24 PM | Last reply by Zane Kaminski - Sunday, November 2, 2008 5:11 AM - Items 1 to 20 of 2280923 Next ›
No announcements