[Mono-dev] Mono-2.8.2 Cross Compiled for ARM processor (Interesting issue with Generics)

Sean Hubbell Sean.Hubbell at gdc4s.com
Mon Feb 28 17:30:06 EST 2011

Given the following example, could someone confirm if this is an issue or
just my misunderstanding of the methods?

The below is Mono 2.8.2 Cross Compiled for an ARM processor. The issue comes
up when I would like to do a couple of things with generics:

   public static bool AreEqual<T>(IEnumerable<T> one, IEnumerable<T> two)
            bool isEquatable =
typeof(IEquatable<T>).IsAssignableFrom(typeof(T)); // Works: true if generic
supports the IEquatable<T> interface.

            bool isEquatable = type.IsInstanceOfType(typeof(IEquatable<T>));
// Does not work: will always return false.


I have another one where we implemented a Predicate<T> and this does not
work as a method but does work when I inline the code if anyone is intersted
in that as well.


View this message in context: http://mono.1490590.n4.nabble.com/Mono-2-8-2-Cross-Compiled-for-ARM-processor-Interesting-issue-with-Generics-tp3328883p3328883.html
Sent from the Mono - Dev mailing list archive at Nabble.com.

More information about the Mono-devel-list mailing list