Click here to Skip to main content
14,423,213 members


Questiondata insert mysql+c# Pin
SHINOJK22-Jul-08 13:09
MemberSHINOJK22-Jul-08 13:09 
AnswerRe: data insert mysql+c# Pin
Dirso22-Jul-08 13:30
MemberDirso22-Jul-08 13:30 
GeneralRe: data insert mysql+c# Pin
Mbah Dhaim23-Jul-08 0:37
MemberMbah Dhaim23-Jul-08 0:37 
QuestionYet another multi-threading question... Pin
DavidBoyd22-Jul-08 12:58
MemberDavidBoyd22-Jul-08 12:58 
Questionpivot table control in c# Pin
Shuaib wasif khan22-Jul-08 12:46
MemberShuaib wasif khan22-Jul-08 12:46 
AnswerRe: pivot table control in c# Pin
Vimalsoft(Pty) Ltd22-Jul-08 13:03
professionalVimalsoft(Pty) Ltd22-Jul-08 13:03 
GeneralRe: pivot table control in c# Pin
PIEBALDconsult22-Jul-08 13:10
professionalPIEBALDconsult22-Jul-08 13:10 
AnswerRe: pivot table control in c# Pin
Guffa22-Jul-08 13:22
MemberGuffa22-Jul-08 13:22 
monu_khan wrote:

You can't cast an object to something that it isn't. You can only cast an object to it's actual class, any of it's base classes, or any of the interfaces that it implements.

C# is type safe, so the object contains information about it's actual type. When you do a cast, you cast the reference, but the object still remains the same type. Therefore, when you cast the DataTable reference to object, you get an object reference pointing to a DataTable object. You can't then cast this to msdatasrc.DataSource, as the actual type of the object does not inherit that class.

If the control can't use a DataTable as data source, you have to copy the data from the DataTable into something that the control can use.

Despite everything, the person most likely to be fooling you next is yourself.

QuestionCreate a file chooser. Pin
AgroDuck22-Jul-08 12:32
MemberAgroDuck22-Jul-08 12:32 
AnswerRe: Create a file chooser. Pin
Vimalsoft(Pty) Ltd22-Jul-08 12:56
professionalVimalsoft(Pty) Ltd22-Jul-08 12:56 
AnswerRe: Create a file chooser. Pin
PIEBALDconsult22-Jul-08 13:13
professionalPIEBALDconsult22-Jul-08 13:13 
Questionsocket programming Pin
AlexPizzano22-Jul-08 12:28
MemberAlexPizzano22-Jul-08 12:28 
AnswerRe: socket programming Pin
DavidBoyd22-Jul-08 12:47
MemberDavidBoyd22-Jul-08 12:47 
GeneralRe: socket programming Pin
AlexPizzano22-Jul-08 12:50
MemberAlexPizzano22-Jul-08 12:50 
AnswerRe: socket programming Pin
nelsonpaixao22-Jul-08 13:22
Membernelsonpaixao22-Jul-08 13:22 
QuestionBlocking Input Pin
Dirso22-Jul-08 12:15
MemberDirso22-Jul-08 12:15 
AnswerRe: Blocking Input Pin
Vimalsoft(Pty) Ltd22-Jul-08 12:53
professionalVimalsoft(Pty) Ltd22-Jul-08 12:53 
GeneralRe: Blocking Input Pin
Dirso22-Jul-08 13:26
MemberDirso22-Jul-08 13:26 
Questiondata binding to combobox Pin
bfis10813722-Jul-08 11:58
Memberbfis10813722-Jul-08 11:58 
AnswerRe: data binding to combobox Pin
Vimalsoft(Pty) Ltd22-Jul-08 12:43
professionalVimalsoft(Pty) Ltd22-Jul-08 12:43 
GeneralRe: data binding to combobox Pin
bfis10813723-Jul-08 4:08
Memberbfis10813723-Jul-08 4:08 
GeneralRe: data binding to combobox Pin
Vimalsoft(Pty) Ltd23-Jul-08 6:45
professionalVimalsoft(Pty) Ltd23-Jul-08 6:45 
GeneralRe: data binding to combobox Pin
bfis10813723-Jul-08 6:53
Memberbfis10813723-Jul-08 6:53 
QuestionReady screen for a simple game Pin
Gareth H22-Jul-08 11:46
MemberGareth H22-Jul-08 11:46 
AnswerRe: Ready screen for a simple game Pin
DaveyM6922-Jul-08 11:56
professionalDaveyM6922-Jul-08 11:56 

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.