double? foo = null; SqlParameter fooParam = command.Parameters.Add("@Foo", SqlDbType.Float); fooParam.Direction = ParameterDirection.Output; if (foo.Value == DBNull.Value) { foo = null; } else { foo = ((double)(fooParam.Value)); }
No comments:
Post a Comment