Yo para hacer eso, en C# hice un metodo: public static bool IsInterfaceImplemented(Type type, Type interfaceType) { return type.FindInterfaces( new TypeFilter( delegate(Type _type, object _filter) { return (_type.Name == ((Type) _filter).Name) && (_type.Namespace == ((Type) _filter).Namespace); } ), interfaceType ).Length == 1; }
Peor por lo visto es mucho mas sencillo lo otro :=) On 8/24/07, Carlos Marcelo Santos <[EMAIL PROTECTED]> wrote: > > ¡¡¡Muchas Gracias!!! > > Auspiciosa manera de comenzar un viernes… > > > > Carlos Marcelo Santos. > > > ------------------------------ > > *From:* puntonet@mug.org.ar [mailto:[EMAIL PROTECTED] *On Behalf Of * > [EMAIL PROTECTED] > *Sent:* Viernes, 24 de Agosto de 2007 02:39 a.m. > *To:* puntonet@mug.org.ar > *Subject:* [puntonet] Saber si un objeto implementa una interface (Ex: OT > rdp) > > > > If TypeOf miControl Is ISerializable Then > > > > Saludos > > Leonardo > > > ------------------------------ > > *De:* Carlos Marcelo Santos [mailto:[EMAIL PROTECTED] > *Enviado el:* Jueves, 23 de Agosto de 2007 09:53 p.m. > *Para:* puntonet@mug.org.ar > *Asunto:* [puntonet] Saber si un objeto implementa una interface (Ex: OT > rdp) > > > > * Replies will be sent through Spamex to puntonet@mug.org.ar > * For additional info click -> www.spamex.com/i/?v=13137989 > > > > Hola Diego: > > Gracias por prolijar el subject. > > No funciona para este caso > > If miControl Is ISerializable Then > > Da error > > Y ahora probé > > If miControl = ISerializable Then > > También da error > > > > Gracias. > > > > Carlos Marcelo Santos. > > > ------------------------------ > > *From:* puntonet@mug.org.ar [mailto:[EMAIL PROTECTED] *On Behalf Of *Diego > Jancic > *Sent:* Jueves, 23 de Agosto de 2007 09:42 p.m. > *To:* puntonet@mug.org.ar > *Subject:* [puntonet] Saber si un objeto implementa una interface (Ex: OT > rdp) > > > > Hola, > > Cambie el asunto del email para que se entienda un poco mas de que estamos > hablando… > > > > Según un traductor de C# a VB.NET <http://vb.net/>, esto: > > > > bool a = myControl is ISerializable; > > > > se traduce a esto: > > > > Dim a As Boolean = (myControl = ISerializable) > > > > > > Espero que te sirva. > > > > Saludos, > Diego > > > > > ------------------------------ > > *From:* puntonet@mug.org.ar [mailto:[EMAIL PROTECTED] *On Behalf Of *Carlos > Marcelo Santos > *Sent:* Jueves, 23 de Agosto de 2007 09:34 p.m. > *To:* puntonet@mug.org.ar > *Subject:* [puntonet] OT rdp > > > > Hola Gente: > > ¿Cómo se pregunta en VB si un objeto implementa una interface? > > Lo que en C# sería > > if (myControl is ISerializable) > > > > Gracias. > > > > Carlos Marcelo Santos. > > No virus found in this incoming message. > Checked by AVG Free Edition. > Version: 7.5.484 / Virus Database: 269.12.2/967 - Release Date: 22/08/2007 > 06:51 p.m. > > No virus found in this outgoing message. > Checked by AVG Free Edition. > Version: 7.5.484 / Virus Database: 269.12.2/967 - Release Date: 22/08/2007 > 06:51 p.m. > > No virus found in this incoming message. > Checked by AVG Free Edition. > Version: 7.5.484 / Virus Database: 269.12.2/967 - Release Date: 22/08/2007 > 06:51 p.m. > > No virus found in this outgoing message. > Checked by AVG Free Edition. > Version: 7.5.484 / Virus Database: 269.12.2/967 - Release Date: 22/08/2007 > 06:51 p.m. > > No virus found in this incoming message. > Checked by AVG Free Edition. > Version: 7.5.484 / Virus Database: 269.12.2/967 - Release Date: 22/08/2007 > 06:51 p.m. > > No virus found in this outgoing message. > Checked by AVG Free Edition. > Version: 7.5.484 / Virus Database: 269.12.2/967 - Release Date: 22/08/2007 > 06:51 p.m. >