outofrangeexception

    2热度

    1回答

    它抛出一个ArgumentOutOfRangeException在for循环的中间,请注意,我切出的,其余为环 for (int i = 0; i < CurrentUser.Course_ID.Count - 1; i++) { CurrentUser.Course[i].Course_ID = CurrentUser.Course_ID[i]; } 的代码,课程是 publ

    1热度

    1回答

    没有越界我注意到在Matlab以下。 >> a = [1, 3]; >> a(3, 4) = 1 a = 1 2 0 0 0 0 0 0 0 0 0 1 >> a(5, 4) ??? Attempted to access a(5,4); index out of bounds because size(a)=[3,4]. 是不是a最初的大小为1?为什么不是抱

    1热度

    2回答

    这可能很简单,但我真的无法在Google上正确说出它。我有一个ArrayList保存每个线程的信息。每个线程都有自己的ID。所以,一开始: myList.add(theIdOfTheThread, new InfoForTheThread()); //Add new thread info at index theIdOfTheThread 而当我想信息: myList.get(myId);

    0热度

    1回答

    好吧我的Windows应用程序出现问题。我的DataGridView包含以下列:产品名称,数量,价格,小计。因此,我假定这些的细胞指数分别如下:0,1,2,3。然而,每当我尝试执行代码如下: txtSubtotalProducts.Text = "Php " + (Convert.ToDouble(dgvProducts.Rows[0].Cells[3].Value) + Convert.ToDo

    0热度

    1回答

    我的网络项目。它给出IndexOutOfBound异常。我写try,catch块。这个异常处理,但按任意键继续是消息显示。给任何解决方案。

    0热度

    3回答

    我处理文件以及与每个节点线看起来像这样的链接列表: struct TextLine{ //The actual text string text; //The line number of the document int line_num; //A pointer to the next line TextLine * next; }

    0热度

    1回答

    我很新,很缺乏经验。我已经从MSDN下载了一个WPF版本的俄罗斯方块来检查代码并尝试查看发生了什么,但程序中有错误,我不确定是什么导致它。异常的详细信息如下: System.IndexOutOfRangeException was unhandled Message=Index was outside the bounds of the array. Source=WPFTet

    0热度

    1回答

    我目前正在使用C#XNA制作一些游戏。因为我需要通过网络发送大量数据(大约96kb),所以我使用了一些字符串压缩/解压缩代码,这些代码在互联网上找到。 的代码看起来是这样的: public static string Compress(string text) { byte[] buffer = Encoding.UTF8.GetBytes(text); Mem

    2热度

    2回答

    我有这个代码,它允许我传入一个索引,并有选择地检索数组中的图像的数量为一定的范围长度 - 取决于方向。 纵向时,范围应该是每个索引20个项目,并且我总共有43个项目。然而,当我通过最后一个索引时,我得到超出[0..42]范围的索引59的超范围异常。 NSArray *tempArray = [self imageData]; UIDeviceOrientation devOr = [[UIDe