Click here to Skip to main content
15,889,877 members
Home / Discussions / C#
   

C#

 
AnswerRe: Receiving RS232 signals through USB Pin
Joe Woodbury29-Aug-08 11:47
professionalJoe Woodbury29-Aug-08 11:47 
Questionhow to build my own Outlook? Pin
Jassim Rahma29-Aug-08 5:22
Jassim Rahma29-Aug-08 5:22 
AnswerRe: how to build my own Outlook? Pin
Kevin Marois29-Aug-08 8:02
professionalKevin Marois29-Aug-08 8:02 
AnswerRe: how to build my own Outlook? Pin
Pete O'Hanlon29-Aug-08 8:40
mvePete O'Hanlon29-Aug-08 8:40 
GeneralRe: how to build my own Outlook? Pin
Jassim Rahma29-Aug-08 10:22
Jassim Rahma29-Aug-08 10:22 
GeneralRe: how to build my own Outlook? Pin
Wendelius29-Aug-08 10:37
mentorWendelius29-Aug-08 10:37 
GeneralRe: how to build my own Outlook? Pin
Pete O'Hanlon30-Aug-08 11:14
mvePete O'Hanlon30-Aug-08 11:14 
QuestionInheritance and type casting Pin
Dewald29-Aug-08 4:14
Dewald29-Aug-08 4:14 
I have some questions on type casting and inherited classes. First two easy questions:

1. What is the difference between "type casting" and "boxing"? The latter is a term that's new to me and I get the impression that it might be different terms for the same concept? Am I wrong?

2. Given ClassB cb = new ClassB();
Is there a difference between:
ClassA ca = cb as ClassA;
and
ClassA ca = (ClassA)cb;

But now for the more important question. Let's say I have two classes, ClassA and ClassB which inherits ClassA. Typecasting from ClassB to ClassA is a rather straightforward affair:
ClassB cb = new ClassB();<br />
ClassA ca = (ClassA)cb;


Is there a way to typecast the other way round? In other words, I have an instance of ClassA and I want to use it and view it as if it is of ClassB. Of course there might be some member variables specific to ClassB which might not be initialised. I would imagine that the best would be if the typecast first calls the default constructor of ClassB so that those member variables are initialised and then changes the type from ClassA to ClassB or something like that.

Am I making sense at least? Thanks in advance.
AnswerRe: Inheritance and type casting Pin
Scott Dorman29-Aug-08 4:48
professionalScott Dorman29-Aug-08 4:48 
AnswerRe: Inheritance and type casting Pin
Abhishek Sur29-Aug-08 4:50
professionalAbhishek Sur29-Aug-08 4:50 
QuestionAttempted to read or write protected memory. This is often an indication that other memory is corrupt. Pin
Shpendh29-Aug-08 4:10
Shpendh29-Aug-08 4:10 
AnswerRe: Attempted to read or write protected memory. This is often an indication that other memory is corrupt. Pin
Pete O'Hanlon29-Aug-08 4:40
mvePete O'Hanlon29-Aug-08 4:40 
GeneralRe: Attempted to read or write protected memory. This is often an indication that other memory is corrupt. Pin
Shpendh29-Aug-08 5:08
Shpendh29-Aug-08 5:08 
GeneralRe: Attempted to read or write protected memory. This is often an indication that other memory is corrupt. Pin
lisan_al_ghaib29-Aug-08 5:59
lisan_al_ghaib29-Aug-08 5:59 
QuestionSearching for a windows form repeater-like method Pin
WhoisUrBuddy29-Aug-08 2:54
WhoisUrBuddy29-Aug-08 2:54 
AnswerRe: Searching for a windows form repeater-like method Pin
Abhishek Sur29-Aug-08 4:55
professionalAbhishek Sur29-Aug-08 4:55 
QuestionDropDownList Property Pin
dataminers29-Aug-08 1:49
dataminers29-Aug-08 1:49 
AnswerRe: DropDownList Property Pin
JoeSharp29-Aug-08 2:16
JoeSharp29-Aug-08 2:16 
QuestionHow to communicate with another application from my application? Pin
Tridip Bhattacharjee29-Aug-08 1:49
professionalTridip Bhattacharjee29-Aug-08 1:49 
AnswerRe: How to communicate with another application from my application? Pin
Abhijit Jana29-Aug-08 1:54
professionalAbhijit Jana29-Aug-08 1:54 
GeneralRe: How to communicate with another application from my application? Pin
Tridip Bhattacharjee31-Aug-08 19:54
professionalTridip Bhattacharjee31-Aug-08 19:54 
AnswerRe: How to communicate with another application from my application? Pin
Abhishek Sur29-Aug-08 4:59
professionalAbhishek Sur29-Aug-08 4:59 
QuestionScreen Capture of WebPages Pin
bhavin chheda29-Aug-08 1:34
bhavin chheda29-Aug-08 1:34 
QuestionDDE communication Pin
San29-Aug-08 1:18
San29-Aug-08 1:18 
AnswerRe: DDE communication Pin
Manas Bhardwaj29-Aug-08 1:26
professionalManas Bhardwaj29-Aug-08 1:26 

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.