Click here to Skip to main content
15,918,193 members
Home / Discussions / C#
   

C#

 
AnswerRe: wtf? Pin
Not Active1-Apr-08 5:28
mentorNot Active1-Apr-08 5:28 
AnswerRe: wtf? Pin
Stu Richardson1-Apr-08 5:33
Stu Richardson1-Apr-08 5:33 
GeneralRe: wtf? Pin
Andrew Rissing1-Apr-08 5:36
Andrew Rissing1-Apr-08 5:36 
AnswerRe: wtf? Pin
Andrew Rissing1-Apr-08 5:33
Andrew Rissing1-Apr-08 5:33 
AnswerRe: wtf? Pin
led mike1-Apr-08 6:04
led mike1-Apr-08 6:04 
GeneralRe: wtf? Pin
Gareth H1-Apr-08 10:32
Gareth H1-Apr-08 10:32 
GeneralCast an object into a specific type without knowing what type the object is Pin
arnold_w1-Apr-08 3:38
arnold_w1-Apr-08 3:38 
GeneralRe: Cast an object into a specific type without knowing what type the object is Pin
Simon P Stevens1-Apr-08 4:03
Simon P Stevens1-Apr-08 4:03 
That kinda defeats the point of a strongly typed language. why would you ever want to do that?

(As far as I'm aware a dynamic cast like that isn't possible. you wouldn't know at compile time what type of object it was, so all it could be assigned to would be an Object type, so you'd instantly lose the cast Feel free to correct me if anybody knows better)

You'll probably find your problem is better solved by redesigning the class hierarchy your using, or using Generics instead.

Post a bit more detail so I can try to understand why you need to do this.

Simon

GeneralRe: Cast an object into a specific type without knowing what type the object is Pin
laserbaronen1-Apr-08 4:22
laserbaronen1-Apr-08 4:22 
GeneralRe: Cast an object into a specific type without knowing what type the object is Pin
led mike1-Apr-08 4:40
led mike1-Apr-08 4:40 
GeneralRe: Cast an object into a specific type without knowing what type the object is [modified] Pin
arnold_w1-Apr-08 22:57
arnold_w1-Apr-08 22:57 
QuestionHow to check current date falls between start date and end date? Pin
chakran1-Apr-08 3:09
chakran1-Apr-08 3:09 
AnswerRe: How to check current date falls between start date and end date? [modified] Pin
Simon P Stevens1-Apr-08 4:04
Simon P Stevens1-Apr-08 4:04 
AnswerRe: How to check current date falls between start date and end date? Pin
DaveyM691-Apr-08 4:11
professionalDaveyM691-Apr-08 4:11 
GeneralRe: How to check current date falls between start date and end date? Pin
Simon P Stevens1-Apr-08 6:25
Simon P Stevens1-Apr-08 6:25 
GeneralRe: How to check current date falls between start date and end date? Pin
DaveyM691-Apr-08 10:38
professionalDaveyM691-Apr-08 10:38 
QuestionHow use a decimal number from a Commandline Pin
megabrain1-Apr-08 2:17
megabrain1-Apr-08 2:17 
AnswerRe: How use a decimal number from a Commandline Pin
Luc Pattyn1-Apr-08 3:17
sitebuilderLuc Pattyn1-Apr-08 3:17 
GeneralRe: How use a decimal number from a Commandline Pin
megabrain1-Apr-08 3:32
megabrain1-Apr-08 3:32 
GeneralRe: How use a decimal number from a Commandline Pin
Luc Pattyn1-Apr-08 3:40
sitebuilderLuc Pattyn1-Apr-08 3:40 
GeneralRe: How use a decimal number from a Commandline Pin
J4amieC1-Apr-08 3:58
J4amieC1-Apr-08 3:58 
GeneralRe: How use a decimal number from a Commandline Pin
Luc Pattyn1-Apr-08 4:12
sitebuilderLuc Pattyn1-Apr-08 4:12 
GeneralRe: How use a decimal number from a Commandline Pin
megabrain1-Apr-08 4:32
megabrain1-Apr-08 4:32 
Questionhow to show image during saving data? Pin
samrat.net1-Apr-08 2:12
samrat.net1-Apr-08 2:12 
AnswerRe: how to show image during saving data? Pin
laserbaronen1-Apr-08 2:17
laserbaronen1-Apr-08 2:17 

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.