Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Casting Question
Message
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Title:
Casting Question
Miscellaneous
Thread ID:
01458169
Message ID:
01458169
Views:
102
In this example, pRecordId is an instance of a SqlParameter class.

This works
int RetVal = Convert.ToInt32(pRecordId.Value);
This throws "Specified cast is not valid"
int RetVal = (int)pRecordId.Value;
Why?
Everything makes sense in someone's mind
public class SystemCrasher :ICrashable
In addition, an integer field is not for irrational people
Next
Reply
Map
View

Click here to load this message in the networking platform