Click here to Skip to main content
15,888,351 members
Home / Discussions / C#
   

C#

 
GeneralRe: CreateInstanceAndUnwrap -- File or Dependency Not Found Pin
leppie9-Mar-04 6:20
leppie9-Mar-04 6:20 
Question.NET interfaces - why doesn't this work? Pin
Judah Gabriel Himango7-Mar-04 19:00
sponsorJudah Gabriel Himango7-Mar-04 19:00 
AnswerRe: .NET interfaces - why doesn't this work? Pin
Meysam Mahfouzi8-Mar-04 0:02
Meysam Mahfouzi8-Mar-04 0:02 
GeneralRe: .NET interfaces - why doesn't this work? Pin
Judah Gabriel Himango8-Mar-04 4:32
sponsorJudah Gabriel Himango8-Mar-04 4:32 
AnswerRe: .NET interfaces - why doesn't this work? Pin
Werdna8-Mar-04 4:20
Werdna8-Mar-04 4:20 
AnswerRe: .NET interfaces - why doesn't this work? Pin
Heath Stewart8-Mar-04 4:22
protectorHeath Stewart8-Mar-04 4:22 
GeneralRe: .NET interfaces - why doesn't this work? Pin
Judah Gabriel Himango8-Mar-04 8:48
sponsorJudah Gabriel Himango8-Mar-04 8:48 
GeneralRe: .NET interfaces - why doesn't this work? Pin
Tom Larsen8-Mar-04 9:24
Tom Larsen8-Mar-04 9:24 
You are trying to circumvent the strongly typed system in .Net. You should write a shim object that behaves like a DataView or a BinaryWriter through that shim object/interface. This shim will have Close and any other logic to call the right things.

Too many times people try to use "code reuse" to get out of the wrong type of work. You have a situation where you have two objects that behave in a similiar manner but aren't related. The logic to determine which one is applicable has to exist somewhere.

ps. Even in C++, the results of doing what you were doing is somewhat unexpected (and often frowned upon). Close could be any method on any object in the inheritance chain. If the v-table is built arbitrarialy (ie. in a random order) then who knows which object version of Close you just called. It is one the banes of having a system where multiple inheritance exists.
GeneralRe: .NET interfaces - why doesn't this work? Pin
Judah Gabriel Himango8-Mar-04 10:08
sponsorJudah Gabriel Himango8-Mar-04 10:08 
GeneralRe: .NET interfaces - why doesn't this work? Pin
Heath Stewart8-Mar-04 10:22
protectorHeath Stewart8-Mar-04 10:22 
AnswerRe: .NET interfaces - why doesn't this work? Pin
Tom Larsen8-Mar-04 9:13
Tom Larsen8-Mar-04 9:13 
GeneralRe: .NET interfaces - why doesn't this work? Pin
Judah Gabriel Himango8-Mar-04 10:04
sponsorJudah Gabriel Himango8-Mar-04 10:04 
GeneralRe: .NET interfaces - why doesn't this work? Pin
Nick Parker8-Mar-04 17:57
protectorNick Parker8-Mar-04 17:57 
Generalloop error Pin
ASGill7-Mar-04 16:42
ASGill7-Mar-04 16:42 
GeneralRe: loop error Pin
Judah Gabriel Himango7-Mar-04 16:51
sponsorJudah Gabriel Himango7-Mar-04 16:51 
GeneralRe: loop error Pin
ASGill7-Mar-04 18:06
ASGill7-Mar-04 18:06 
GeneralRe: loop error Pin
Judah Gabriel Himango7-Mar-04 18:51
sponsorJudah Gabriel Himango7-Mar-04 18:51 
GeneralRe: loop error Pin
Dave Kreskowiak8-Mar-04 3:01
mveDave Kreskowiak8-Mar-04 3:01 
GeneralRe: loop error Pin
ASGill8-Mar-04 3:15
ASGill8-Mar-04 3:15 
GeneralRe: loop error Pin
Dave Kreskowiak8-Mar-04 8:08
mveDave Kreskowiak8-Mar-04 8:08 
GeneralReading from text file and spliting information into array Pin
lordjpg7-Mar-04 14:04
lordjpg7-Mar-04 14:04 
GeneralRe: Reading from text file and spliting information into array Pin
Matthew Hazlett7-Mar-04 16:34
Matthew Hazlett7-Mar-04 16:34 
QuestionJpeg 2000 and .NET (C# / VB.NET / C++.NET / J#) ???? Pin
gicio7-Mar-04 9:31
gicio7-Mar-04 9:31 
QuestionBITS (Background Intelligent Transfer Service) and .NET ???? Pin
gicio7-Mar-04 9:31
gicio7-Mar-04 9:31 
AnswerRe: BITS (Background Intelligent Transfer Service) and .NET ???? Pin
Nick Parker7-Mar-04 9:58
protectorNick Parker7-Mar-04 9: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.