[Mono-bugs] [Bug 325495] arrays don' t appear to be implementing all the generic interfaces in 2.0
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Tue Oct 2 09:32:37 EDT 2007
https://bugzilla.novell.com/show_bug.cgi?id=325495#c7
--- Comment #7 from Paolo Molaro <lupus at novell.com> 2007-10-02 07:32:36 MST ---
It looks like some of the generic interfaces are explicitly
implemented (as in returned from GetInterfaces()). This still allows the above
idea to work.
using System;
class T {
static void Main () {
Type[] ifaces;
Console.WriteLine ("{0} interfaces:", typeof(string[]));
ifaces = typeof(string[]).GetInterfaces ();
for (int i = 0; i < ifaces.Length; ++i)
Console.WriteLine (ifaces [i]);
Console.WriteLine ("{0} interfaces:", typeof(string[][]));
ifaces = typeof(string[][]).GetInterfaces ();
for (int i = 0; i < ifaces.Length; ++i)
Console.WriteLine (ifaces [i]);
}
}
System.String[] interfaces:
System.ICloneable
System.Collections.IList
System.Collections.ICollection
System.Collections.IEnumerable
System.Collections.Generic.IList`1[System.String]
System.Collections.Generic.ICollection`1[System.String]
System.Collections.Generic.IEnumerable`1[System.String]
System.String[][] interfaces:
System.ICloneable
System.Collections.IList
System.Collections.ICollection
System.Collections.IEnumerable
System.Collections.Generic.IList`1[System.String[]]
System.Collections.Generic.ICollection`1[System.String[]]
System.Collections.Generic.IEnumerable`1[System.String[]]
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
More information about the mono-bugs
mailing list