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