Results 1 to 5 of 5

Thread: [RESOLVED] Invalid cast exception

Threaded View

  1. #1

    Thread Starter
    Hyperactive Member Quasar6's Avatar
    Join Date
    Mar 2008
    Location
    Sol 3
    Posts
    325

    Resolved [RESOLVED] Invalid cast exception

    I'm getting an invalid cast exception which makes no sense whatsoever (see attachment).

    It occurs no matter what the number in the cell is.

    The ids variable is defined as so:
    c# Code:
    1. List<int> ids = new List<int>();

    Just below the line creating the error is another line...
    c# Code:
    1. link_Main_RFITableAdapter.DeleteID((int)row.Cells[0].Value);
    ... which contains the same cast. This line does not produce the error whien I run the program without the first line.

    Can anyone help? This is pretty urgent: I can't do much until I've fixed it.

    Thanks in advance,
    Qu.
    Attached Images Attached Images  
    Last edited by Quasar6; Jul 6th, 2008 at 07:08 PM.
    "Why do all my attempts at science end with me getting punched by batman?" xkcd.

    |Pong||
    Sorry for not posting more often.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width