Click here to Skip to main content
15,922,630 members
Home / Discussions / C#
   

C#

 
AnswerRe: c# Pin
Colin Angus Mackay15-Aug-07 4:38
Colin Angus Mackay15-Aug-07 4:38 
GeneralRe: c# Pin
Pete O'Hanlon15-Aug-07 4:42
mvePete O'Hanlon15-Aug-07 4:42 
GeneralRe: c# Pin
Paul Conrad18-Aug-07 6:27
professionalPaul Conrad18-Aug-07 6:27 
AnswerRe: c# Pin
Colin Angus Mackay15-Aug-07 4:46
Colin Angus Mackay15-Aug-07 4:46 
GeneralRe: c# Pin
Justin Perez15-Aug-07 4:55
Justin Perez15-Aug-07 4:55 
GeneralRe: c# Pin
Colin Angus Mackay15-Aug-07 5:16
Colin Angus Mackay15-Aug-07 5:16 
GeneralRe: c# Pin
Justin Perez15-Aug-07 5:29
Justin Perez15-Aug-07 5:29 
AnswerRe: c# Pin
Baconbutty15-Aug-07 4:53
Baconbutty15-Aug-07 4:53 
AnswerGO AWAY Pin
leckey15-Aug-07 6:17
leckey15-Aug-07 6:17 
Question.NET Charts Control Pin
Fouad_kayali15-Aug-07 4:23
Fouad_kayali15-Aug-07 4:23 
AnswerRe: .NET Charts Control Pin
Judah Gabriel Himango15-Aug-07 4:26
sponsorJudah Gabriel Himango15-Aug-07 4:26 
Questionc# Pin
lankaudaranga15-Aug-07 4:15
lankaudaranga15-Aug-07 4:15 
AnswerRe: c# Pin
Colin Angus Mackay15-Aug-07 4:17
Colin Angus Mackay15-Aug-07 4:17 
AnswerRe: c# Pin
Justin Perez15-Aug-07 4:18
Justin Perez15-Aug-07 4:18 
AnswerRe: c# Pin
Scott Dorman15-Aug-07 4:21
professionalScott Dorman15-Aug-07 4:21 
Questionc# Pin
lankaudaranga15-Aug-07 4:12
lankaudaranga15-Aug-07 4:12 
AnswerRe: c# Pin
Scott Dorman15-Aug-07 4:16
professionalScott Dorman15-Aug-07 4:16 
AnswerRe: c# Pin
Colin Angus Mackay15-Aug-07 4:19
Colin Angus Mackay15-Aug-07 4:19 
GeneralRe: c# Pin
Scott Dorman15-Aug-07 4:21
professionalScott Dorman15-Aug-07 4:21 
GeneralRe: c# Pin
Justin Perez15-Aug-07 4:22
Justin Perez15-Aug-07 4:22 
GeneralRe: c# Pin
Bert delaVega15-Aug-07 5:39
Bert delaVega15-Aug-07 5:39 
GeneralRe: c# Pin
Justin Perez15-Aug-07 5:43
Justin Perez15-Aug-07 5:43 
QuestionInvalidCastException for interface Pin
__DanC__15-Aug-07 3:54
__DanC__15-Aug-07 3:54 
AnswerRe: InvalidCastException for interface Pin
Justin Perez15-Aug-07 3:57
Justin Perez15-Aug-07 3:57 
AnswerRe: InvalidCastException for interface Pin
Scott Dorman15-Aug-07 4:14
professionalScott Dorman15-Aug-07 4:14 
So you have an interface that looks like this:
C#
public interface IMyFunctions
{
   SomeFunction(IntPtr param1, int param2);
   SomeFunction(MyClass param1, MyEnum param2);
}
which is defined in assembly Interfaces.dll?

In some other assembly you have a class that looks like
C#
public class SomeClass : IMyFunction
{
   SomeFunction(IntPtr param1, int param2) { ... };
   SomeFunction(MyClass param1, MyEnum param2) { ... };
}
Assuming that the above is reasonably correct to your implementation, you get an InvalidCastException when you try to do what?

What do you mean "they are defined with the same GUID"? There are no GUIDs that you can set that have any kind of impact on the compiler and runtime behavior.

Have you stepped through the code with a debugger attached to see where the exception is actually ocurring? That should give you a better idea of what is going wrong.

-----------------------------
In just two days, tomorrow will be yesterday.

http://geekswithblogs.net/sdorman

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.