Click here to Skip to main content
15,921,226 members
Home / Discussions / C#
   

C#

 
AnswerRe: Accessing MDI parent controls through child forms, [modified] Pin
Tirthadip29-Mar-07 19:29
Tirthadip29-Mar-07 19:29 
QuestionProgramatically exploring COM/ActivX methods/properties in C# Pin
Michael Elly29-Mar-07 11:04
Michael Elly29-Mar-07 11:04 
Question2 port tcplistener? Pin
dino209429-Mar-07 11:03
dino209429-Mar-07 11:03 
AnswerRe: 2 port tcplistener? Pin
Colin Angus Mackay29-Mar-07 22:58
Colin Angus Mackay29-Mar-07 22:58 
QuestionMake a strongly typed dataset COM accesible Pin
Brent Lamborn29-Mar-07 10:32
Brent Lamborn29-Mar-07 10:32 
QuestionTesting whether class 1 implements an interface found in class 2 Pin
Marc Clifton29-Mar-07 10:11
mvaMarc Clifton29-Mar-07 10:11 
AnswerRe: Testing whether class 1 implements an interface found in class 2 Pin
dbrenth29-Mar-07 10:29
dbrenth29-Mar-07 10:29 
AnswerRe: Testing whether class 1 implements an interface found in class 2 Pin
Pete O'Hanlon29-Mar-07 10:33
mvePete O'Hanlon29-Mar-07 10:33 
It's late here so I may be missing something, but I would look at using something like:
using System;
using System.Collections.Generic;
using System.Text;

namespace ConsoleApplication1
{
  class Program
  {
    static void Main(string[] args)
    {
      Type[] ifaceA = typeof(A).GetInterfaces();
      Type[] ifaceB = typeof(B).GetInterfaces();

      List<Type> types = new List<Type>();
      types.AddRange(ifaceA);

      foreach (Type t in ifaceB)
      {
        if (types.Contains(t))
          Console.WriteLine("Found {0}", t.Name);
      }
    }
  }

  interface IList1
  {
    void Name();
  }
  public class B : IList1
  {
    #region IList1 Members

    public void Name()
    {
      throw new Exception("The method or operation is not implemented.");
    }

    #endregion
  }
  public class A : IDisposable, IList1
  {
    #region IDisposable Members

    public void Dispose()
    {
      throw new Exception("The method or operation is not implemented.");
    }

    #endregion

    #region IList1 Members

    public void Name()
    {
      throw new Exception("The method or operation is not implemented.");
    }

    #endregion
  }
}


Deja View - the feeling that you've seen this post before.

GeneralRe: Testing whether class 1 implements an interface found in class 2 Pin
Marc Clifton29-Mar-07 11:15
mvaMarc Clifton29-Mar-07 11:15 
GeneralRe: Testing whether class 1 implements an interface found in class 2 Pin
Scott Dorman29-Mar-07 20:55
professionalScott Dorman29-Mar-07 20:55 
GeneralRe: Testing whether class 1 implements an interface found in class 2 Pin
Colin Angus Mackay29-Mar-07 21:07
Colin Angus Mackay29-Mar-07 21:07 
GeneralRe: Testing whether class 1 implements an interface found in class 2 Pin
Pete O'Hanlon29-Mar-07 22:27
mvePete O'Hanlon29-Mar-07 22:27 
Question[Message Deleted] Pin
R_L_H29-Mar-07 8:32
R_L_H29-Mar-07 8:32 
AnswerRe: How can I check to see if a file is being accessed by another process? Pin
Vasudevan Deepak Kumar29-Mar-07 9:03
Vasudevan Deepak Kumar29-Mar-07 9:03 
GeneralRe: How can I check to see if a file is being accessed by another process? Pin
Not Active29-Mar-07 9:25
mentorNot Active29-Mar-07 9:25 
GeneralRe: How can I check to see if a file is being accessed by another process? Pin
Vasudevan Deepak Kumar29-Mar-07 12:13
Vasudevan Deepak Kumar29-Mar-07 12:13 
QuestionHELP NEEDED - DCOM Server in C#? Pin
r6yamaha29-Mar-07 8:16
r6yamaha29-Mar-07 8:16 
QuestionProblem using ListView control? Pin
Khoramdin29-Mar-07 8:10
Khoramdin29-Mar-07 8:10 
AnswerRe: Problem using ListView control? Pin
kubben29-Mar-07 8:19
kubben29-Mar-07 8:19 
QuestionHow to install the IE plugin from DLL Pin
Nadia Monalisa29-Mar-07 7:59
Nadia Monalisa29-Mar-07 7:59 
QuestionCan I create an array or List&amp;lt;&amp;gt; of class properties? [modified] Pin
Member 9629-Mar-07 7:38
Member 9629-Mar-07 7:38 
AnswerRe: Can I create an array or List of class properties? Pin
Not Active29-Mar-07 7:58
mentorNot Active29-Mar-07 7:58 
GeneralRe: Can I create an array or List of class properties? Pin
Member 9629-Mar-07 8:09
Member 9629-Mar-07 8:09 
GeneralRe: Can I create an array or List of class properties? Pin
Not Active29-Mar-07 8:28
mentorNot Active29-Mar-07 8:28 
GeneralRe: Can I create an array or List of class properties? Pin
Member 9629-Mar-07 8:58
Member 9629-Mar-07 8:58 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.