No announcements
Found 2502824 threads
-
0 Votes
Unity TypeLoadException - Could not load type because it declares a covariant or contravariant type parameter and is not an interface or delegate.
Hi I am trying to implement a logger using the Unity Interceptor. -
6 Votes
Covariance with interfaces
Section §13.1.3.2: A type T<A1, …, An> is variance-convertible to a type T<B1, …, Bn> if T is either an ...Answered | 22 Replies | 4216 Views | Created by Markos101 - Monday, March 10, 2014 11:21 AM | Last reply by Diogo Castro - Thursday, March 13, 2014 1:23 PM -
2 Votes
Covariance vs Controvariance
Hi, By definition , Covariance and Contravariance enables implicit reference conversion for array types, delegate types and generric ...Answered | 3 Replies | 2970 Views | Created by alavudeen batcha - Sunday, May 20, 2012 2:10 PM | Last reply by Adavesh - Tuesday, May 29, 2012 5:35 AM -
1 Votes
Returning object with generic type from a method
Because They are different objects.Answered | 2 Replies | 514 Views | Created by Ken2017 - Thursday, August 3, 2017 4:43 AM | Last reply by Yong Lu - Friday, August 4, 2017 6:02 AM -
0 Votes
Could we have IDbContext<> covariant as in IQueryable<>
Ant, IDbSet cannot be covariant for the same reason that ICollection is not—it contains methods, such as Add, that pass arguments of ...Answered | 2 Replies | 5621 Views | Created by Anthony Johnston - Friday, March 11, 2011 10:16 AM | Last reply by Anthony Johnston - Monday, March 14, 2011 2:28 PM -
0 Votes
Could not load type 'Microsoft.LightSwitch.WebHost.Implementation.RedirectToHttpsModule'
Exception Details: System.TypeLoadException: Could not load type 'Microsoft.LightSwitch.WebHost.Implementation.RedirectToHttpsModule' ...Answered | 2 Replies | 4349 Views | Created by Steve McRae - Thursday, March 17, 2011 8:02 PM | Last reply by Steve McRae - Thursday, March 17, 2011 11:36 PM -
0 Votes
Covariance Maybe
You should inherit this interface and implement the GetEnumerator method.Answered | 4 Replies | 3290 Views | Created by shaggygi - Saturday, October 8, 2011 12:46 PM | Last reply by Leo Liu - MSFT - Thursday, October 13, 2011 10:10 AM -
0 Votes
contravariance and covairance in C#
This might help get you started: http://blogs.msdn.com/b/ericlippert/archive/2007/10/16/covariance-and-contravariance-in-c-part-one.aspx For C# ...Answered | 1 Replies | 2708 Views | Created by sams6 - Wednesday, October 27, 2010 6:06 AM | Last reply by DeborahK - Wednesday, October 27, 2010 6:17 AM -
5 Votes
Interface As return type in C#
Hence you'd use the interface/ABC as the return type.Answered | 7 Replies | 16422 Views | Created by Arash_89 - Sunday, March 11, 2018 11:25 PM | Last reply by Simple Samples - Tuesday, March 13, 2018 3:42 AM -
0 Votes
Cannot convert lambda expression to type 'Delegate' because it is not a delegate type
>Cannot convert lambda expression to type 'Delegate' because it is not a delegate type.Answered | 1 Replies | 16815 Views | Created by s.robinson154 - Monday, July 4, 2016 3:06 PM | Last reply by Jack Zhai-MSFT - Tuesday, July 5, 2016 11:13 AM -
0 Votes
Private Accessor for covariant/contravariant types
Cannot say what could be causing the issue, but these links might shed some light.Answered | 1 Replies | 4641 Views | Created by Hoop - Tuesday, July 27, 2010 6:43 AM | Last reply by Rudedog2 - Tuesday, July 27, 2010 9:58 PM -
0 Votes
Casting Collection of Object to Collection of Derived Type
RadarInfo would just be one of the types that would implement the IMyInfo interface and be able to be placed into the list.Answered | 7 Replies | 3609 Views | Created by dtheese - Friday, May 21, 2010 9:53 PM | Last reply by Nishant Sivakumar - Monday, May 24, 2010 3:20 PM -
0 Votes
Generic parameters and interfaces
In .NET 4, many generic types are covariant or contravariant.Answered | 13 Replies | 2990 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 -
0 Votes
Cannot convert anonymous method to type 'string' because it is not a delegate type
Well, the delegate isn't required, at all, to just format the string.Answered | 5 Replies | 10521 Views | Created by John Basedow - Monday, December 21, 2009 5:54 PM | Last reply by Reed Copsey, Jr - Monday, December 21, 2009 7:07 PM -
0 Votes
Generic collections and Interfaces
The fact that the underlying generic type parameters are compatible doesn't change the higher level type.Answered | 6 Replies | 738 Views | Created by Ethan Strauss - Thursday, January 16, 2020 5:45 PM | Last reply by Ethan Strauss - Friday, January 17, 2020 6:05 PM -
2 Votes
Covariance and Contravariance
From docummentation: Covariance permits a method to have a more derived return type than that defined by the generic type parameter of the ...Answered | 5 Replies | 818 Views | Created by NANDAKUMAR T - Friday, November 21, 2014 8:59 AM | Last reply by NANDAKUMAR T - Friday, November 21, 2014 10:18 AM -
0 Votes
declaring a variable of type interface and object
Declaring a variable as IEnumerable means it is a variable that supports the IEnumerable interface.Answered | 1 Replies | 2668 Views | Created by ejhmd - Tuesday, October 19, 2010 9:43 PM | Last reply by DeborahK - Wednesday, October 20, 2010 5:28 AM -
0 Votes
TypeLoadException for this specific class/interface pattern
-Karel Zikmund (Developer on CLR Type System team)Answered | 4 Replies | 3808 Views | Created by ridkun - Wednesday, February 4, 2009 1:16 PM | Last reply by Karel Zikmund - Wednesday, February 4, 2009 6:08 PM -
0 Votes
Interfaces and Contravariance Q. - No Delegates
Contravariance allows the parameter types to be less specialized than the original method specification.Answered | 5 Replies | 4322 Views | Created by AMohan - Saturday, July 8, 2006 10:34 PM | Last reply by AMohan - Wednesday, July 12, 2006 12:06 AM -
2 Votes
What is difference between delegate and interface
Try to declare a variable of some interface type and assigning a delegate to it.Answered | 6 Replies | 1754 Views | Created by Sudip_inn - Saturday, November 5, 2016 4:37 PM | Last reply by Wendy Zang - Monday, November 7, 2016 6:27 AM - Items 1 to 20 of 2502824 Next ›
No announcements