Retourner au contenu associé (entrée de forum : Problème avec IsSubclassOf)
Posté par TazForEver le 05 février 2005 à 12:24. En réponse au message Problème avec IsSubclassOf. Évalué à 2.
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル
# Type.GetInterfaces()
Posté par TazForEver . En réponse au message Problème avec IsSubclassOf. Évalué à 2.
using System.Reflection;
public class plugin
{
public static void Main(string[] args)
{
foreach(string path in args)
{
Assembly asm = Assembly.LoadFrom(path);
foreach(Type t in asm.GetTypes())
{
foreach(Type i in t.GetInterfaces())
{
if(i == typeof(System.Collections.ICollection))
{
Console.WriteLine(t);
break;
}
}
}
}
}
}
PS: désolé pour l'indentation de merde, ça fait des années qu'on réclame un balise tt qui fonctionne :o