Click here to Skip to main content
15,915,319 members
Home / Discussions / C#
   

C#

 
GeneralRe: How do i check if an object can be cast to a valid SQLDbType? Pin
Robert Rohde20-Jul-06 23:52
Robert Rohde20-Jul-06 23:52 
GeneralRe: How do i check if an object can be cast to a valid SQLDbType? Pin
Red_Wizard_Shot_The_Food20-Jul-06 23:53
Red_Wizard_Shot_The_Food20-Jul-06 23:53 
GeneralRe: How do i check if an object can be cast to a valid SQLDbType? Pin
Robert Rohde20-Jul-06 23:54
Robert Rohde20-Jul-06 23:54 
GeneralRe: How do i check if an object can be cast to a valid SQLDbType? Pin
Red_Wizard_Shot_The_Food21-Jul-06 0:00
Red_Wizard_Shot_The_Food21-Jul-06 0:00 
GeneralRe: How do i check if an object can be cast to a valid SQLDbType? Pin
Robert Rohde21-Jul-06 0:21
Robert Rohde21-Jul-06 0:21 
GeneralRe: How do i check if an object can be cast to a valid SQLDbType? Pin
Red_Wizard_Shot_The_Food21-Jul-06 0:29
Red_Wizard_Shot_The_Food21-Jul-06 0:29 
GeneralRe: How do i check if an object can be cast to a valid SQLDbType? Pin
Robert Rohde21-Jul-06 1:11
Robert Rohde21-Jul-06 1:11 
AnswerRe: How do i check if an object can be cast to a valid SQLDbType? Pin
Andrei Ungureanu20-Jul-06 22:47
Andrei Ungureanu20-Jul-06 22:47 
hy,
one of the ways you can achieve that is to use exceptions, like this

try
{
//do the cast
}
catch(Exception)
{
//complain
}

using Exception in catch you catch all the exceptions that can occur. Of course you can only catch the InvalidCastException but that's your choice.
Hope it helps.

Do your best to be the best
QuestionDrag drop to usercontrol from toolbox Pin
Piovra_20-Jul-06 22:03
Piovra_20-Jul-06 22:03 
AnswerRe: Drag drop to usercontrol from toolbox Pin
Nader Elshehabi20-Jul-06 22:25
Nader Elshehabi20-Jul-06 22:25 
QuestionHow to Intercept a number when a call comes thru ? [modified] Pin
Trance Junkie20-Jul-06 21:47
Trance Junkie20-Jul-06 21:47 
AnswerRe: How to Intercept a number when a call comes thru ? Pin
stancrm21-Jul-06 2:44
stancrm21-Jul-06 2:44 
Questiongraph in reporting services Pin
cellardoor071620-Jul-06 21:28
cellardoor071620-Jul-06 21:28 
AnswerRe: graph in reporting services Pin
Andrew Rissing21-Jul-06 4:38
Andrew Rissing21-Jul-06 4:38 
QuestionHow can I compare doubles? Pin
xkx3220-Jul-06 21:28
xkx3220-Jul-06 21:28 
AnswerRe: How can I compare doubles? Pin
Nader Elshehabi20-Jul-06 22:10
Nader Elshehabi20-Jul-06 22:10 
AnswerRe: How can I compare doubles? Pin
Andrei Ungureanu20-Jul-06 22:42
Andrei Ungureanu20-Jul-06 22:42 
AnswerRe: How can I compare doubles? Pin
Shajeel21-Jul-06 0:35
Shajeel21-Jul-06 0:35 
AnswerRe: How can I compare doubles? Pin
Super Lloyd21-Jul-06 0:44
Super Lloyd21-Jul-06 0:44 
QuestionHow to get a DataTable from StoreProcedure? Pin
Old Gun20-Jul-06 20:58
Old Gun20-Jul-06 20:58 
QuestionHowTo Print A Grid In A Window Application Pin
Vipin Venugopal20-Jul-06 20:47
Vipin Venugopal20-Jul-06 20:47 
AnswerRe: HowTo Print A Grid In A Window Application Pin
Duncan Edwards Jones20-Jul-06 21:12
professionalDuncan Edwards Jones20-Jul-06 21:12 
GeneralRe: HowTo Print A Grid In A Window Application Pin
Vipin Venugopal20-Jul-06 23:26
Vipin Venugopal20-Jul-06 23:26 
AnswerRe: HowTo Print A Grid In A Window Application Pin
Nader Elshehabi20-Jul-06 22:50
Nader Elshehabi20-Jul-06 22:50 
QuestionC# .NET 1.1 Application displaying problem in Chinese Windows XP Pin
uz_jaswal20-Jul-06 20:43
uz_jaswal20-Jul-06 20:43 

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.