"Simplicity can't be bought later, it must be earned from the start" -- DB
Friday, July 2, 2010
Unboxing, Casting
int totalPage = (int)(long)cmdCount.ExecuteScalar();
That is not double casting. The first(read from right to left) cast, is actually unboxing, we unbox long from object, then cast the long type to int type
No comments:
Post a Comment