Click here to Skip to main content
15,899,754 members
Home / Discussions / C#
   

C#

 
GeneralRe: IDisposable Pin
Heath Stewart30-Mar-04 16:24
protectorHeath Stewart30-Mar-04 16:24 
QuestionHow do i import/use these dll's ? Pin
mihaimarinescu30-Mar-04 8:53
mihaimarinescu30-Mar-04 8:53 
AnswerRe: How do i import/use these dll's ? Pin
Heath Stewart30-Mar-04 9:38
protectorHeath Stewart30-Mar-04 9:38 
AnswerRe: How do i import/use these dll's ? Pin
Dave Kreskowiak30-Mar-04 9:39
mveDave Kreskowiak30-Mar-04 9:39 
GeneralCasting again - from parent to child Pin
Grep30-Mar-04 8:31
Grep30-Mar-04 8:31 
GeneralRe: Casting again - from parent to child Pin
Heath Stewart30-Mar-04 9:43
protectorHeath Stewart30-Mar-04 9:43 
GeneralRe: Casting again - from parent to child Pin
Grep30-Mar-04 9:59
Grep30-Mar-04 9:59 
GeneralRe: Casting again - from parent to child Pin
Heath Stewart30-Mar-04 10:08
protectorHeath Stewart30-Mar-04 10:08 
It doesn't matter if all you do is extend a class and don't add anything more, it's still not the same Type (that's what it all comes down to). Take the following simplistic test:
using System;
public class Test
{
  static void Main()
  {
    Test t = new Test();
    Test2 t2 = (Test2)t;
  }
}
public class Test2 : Test
{
}
It compiles, but you get an InvalidCastException when run. The reason is that t is not an instance of Test2, so you can't cast it. If I said Test t = new Test2(), then it'd work.

 

Microsoft MVP, Visual C#
My Articles
QuestionIs this a pointer operation ? Pin
Andres Coder30-Mar-04 8:28
Andres Coder30-Mar-04 8:28 
AnswerRe: Is this a pointer operation ? Pin
leppie30-Mar-04 8:50
leppie30-Mar-04 8:50 
AnswerRe: Is this a pointer operation ? Pin
Andy Wieberneit30-Mar-04 11:09
Andy Wieberneit30-Mar-04 11:09 
AnswerRe: Is this a pointer operation ? Pin
Bryan White31-Mar-04 9:01
Bryan White31-Mar-04 9:01 
GeneralC# time to C++ time_t Pin
goodpilot30-Mar-04 8:22
goodpilot30-Mar-04 8:22 
GeneralRe: C# time to C++ time_t Pin
Heath Stewart30-Mar-04 9:31
protectorHeath Stewart30-Mar-04 9:31 
GeneralRe: C# time to C++ time_t Pin
goodpilot30-Mar-04 10:19
goodpilot30-Mar-04 10:19 
GeneralRe: C# time to C++ time_t Pin
Bryan White31-Mar-04 9:11
Bryan White31-Mar-04 9:11 
GeneralRe: C# time to C++ time_t Pin
Heath Stewart31-Mar-04 9:17
protectorHeath Stewart31-Mar-04 9:17 
GeneralWriting and closing files Pin
Member 70426330-Mar-04 7:32
Member 70426330-Mar-04 7:32 
GeneralRe: Writing and closing files Pin
leppie30-Mar-04 7:46
leppie30-Mar-04 7:46 
GeneralRe: Writing and closing files Pin
Member 70426330-Mar-04 7:53
Member 70426330-Mar-04 7:53 
GeneralRe: Writing and closing files Pin
Heath Stewart30-Mar-04 8:51
protectorHeath Stewart30-Mar-04 8:51 
GeneralMP3 Streaming sdk Pin
refahn30-Mar-04 7:32
refahn30-Mar-04 7:32 
GeneralJoint Collection Project Pin
Jonathan de Halleux30-Mar-04 7:13
Jonathan de Halleux30-Mar-04 7:13 
GeneralRe: Joint Collection Project Pin
leppie30-Mar-04 7:42
leppie30-Mar-04 7:42 
GeneralRe: Joint Collection Project Pin
Jonathan de Halleux30-Mar-04 7:48
Jonathan de Halleux30-Mar-04 7:48 

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.