unable to cast object of type 'X' to type 'X'
-
Hello,
Vikram A Punathambekar wrote:
I'm sure you know this; it's probably just that you weren't using the correct terminology.
YEP!
Vikram A Punathambekar wrote:
Don't worry, your English is far better than my German
But I'm sure your German is much better than my Hindi. So the point goes to you! :-D
Vikram A Punathambekar wrote:
Second, when you say Type1 reference1 = new Type2();
Did I?
Vikram A Punathambekar wrote:
Therefore, assuming Type2 inherits from Type1 (directly or indirectly, it doesn't matter), a subsequent cast like Type1 reference2 = reference1; will always work. (You don't even need a cast!)
I hope I never suggested something else! I just wanted to find a possible explanation for the original problem, and tried to proof it with a project which is not working (means the project throws an exception, therefor the proof was ok). Too bad that the one who had the problem seems not to care any more. -- modified at 5:05 Tuesday 10th July, 2007
All the best, Martin
Martin# wrote:
Vikram A Punathambekar wrote: Second, when you say Type1 reference1 = new Type2(); Did I?
Hee hee, when I said "When you say..." I did not imply that you said those words. I was presenting a hypothetical scenario, not saying you said something. BTW, there are far too many languages spoken in India to list. While Hindi is something I'm proficient in, I'm neither very fond of it nor is it my native tongue. About the casting, I think there's just a misunderstanding. Forget all we talked about in this thread and keep up the good work. :)
Cheers, Vıkram.
After all is said and done, much is said and little is done.
-
Martin# wrote:
Vikram A Punathambekar wrote: Second, when you say Type1 reference1 = new Type2(); Did I?
Hee hee, when I said "When you say..." I did not imply that you said those words. I was presenting a hypothetical scenario, not saying you said something. BTW, there are far too many languages spoken in India to list. While Hindi is something I'm proficient in, I'm neither very fond of it nor is it my native tongue. About the casting, I think there's just a misunderstanding. Forget all we talked about in this thread and keep up the good work. :)
Cheers, Vıkram.
After all is said and done, much is said and little is done.
Vikram A Punathambekar wrote:
Hee hee, when I said "When you say..." I did not imply that you said those words. I was presenting a hypothetical scenario, not saying you said something.
Vikram A Punathambekar wrote:
About the casting, I think there's just a misunderstanding. Forget all we talked about in this thread and keep up the good work.
:)
Vikram A Punathambekar wrote:
Forget all we talked about in this thread and keep up the good work.
This perfectly fitts to you Signature (Which allways make me laugh when reading) :laugh:
Vikram A Punathambekar wrote:
BTW, there are far too many languages spoken in India to list
Actually, I looked it up bevore answering you! I choosed the one with the most percentage :-D Here is the link to the German Wikipedia page, for your training. http://de.wikipedia.org/wiki/Indische_Sprachen[^]
All the best, Martin
-
Vikram A Punathambekar wrote:
Hee hee, when I said "When you say..." I did not imply that you said those words. I was presenting a hypothetical scenario, not saying you said something.
Vikram A Punathambekar wrote:
About the casting, I think there's just a misunderstanding. Forget all we talked about in this thread and keep up the good work.
:)
Vikram A Punathambekar wrote:
Forget all we talked about in this thread and keep up the good work.
This perfectly fitts to you Signature (Which allways make me laugh when reading) :laugh:
Vikram A Punathambekar wrote:
BTW, there are far too many languages spoken in India to list
Actually, I looked it up bevore answering you! I choosed the one with the most percentage :-D Here is the link to the German Wikipedia page, for your training. http://de.wikipedia.org/wiki/Indische_Sprachen[^]
All the best, Martin
Martin# wrote:
This perfectly fitts to you Signature (Which allways make me laugh when reading)
I thought my sig was profound and thought-provoking. :~
Martin# wrote:
I choosed the one with the most percentage
My mother tongue is Marathi. The Marathas were one of the most powerful groups in medieval India, resisting the Muslim invaders and even driving them back.
Martin# wrote:
Here is the link to the German Wikipedia page, for your training.
Seeing words like sprachwissenschaftliche and gleichberechtigten makes my head spin. :-D German seems to have a lot of long words. Is it true that there is no neuter gender in German and everything is male/female?
Cheers, Vıkram.
After all is said and done, much is said and little is done.
-
Martin# wrote:
This perfectly fitts to you Signature (Which allways make me laugh when reading)
I thought my sig was profound and thought-provoking. :~
Martin# wrote:
I choosed the one with the most percentage
My mother tongue is Marathi. The Marathas were one of the most powerful groups in medieval India, resisting the Muslim invaders and even driving them back.
Martin# wrote:
Here is the link to the German Wikipedia page, for your training.
Seeing words like sprachwissenschaftliche and gleichberechtigten makes my head spin. :-D German seems to have a lot of long words. Is it true that there is no neuter gender in German and everything is male/female?
Cheers, Vıkram.
After all is said and done, much is said and little is done.
-
I have the following line of code
ResponseProcessingCSP rpCSP = (ResponseProcessingCSP)CSPManager.Instance.GetResponseProcessesingCSP(ChannelID);
GetResponseProcessesingCSP returns an object of type IResponseProcessingCSP ResponseProcessingCSP inherits from type IResponseProcessingCSP as well. This throws an error saying "Unable to cast object of type 'ResponseProcessingCSP' to 'ResponseProcessingCSP' What would be causing this?