索引超出数组异常 [英] index out of array exception

查看:78
本文介绍了索引超出数组异常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,我需要您的帮助.现在,我正在研究一个C#项目,该项目使用霍夫曼方法压缩数据.由于没有用于霍夫曼编码和解码的代码(字符串),因此我决定从vb6.0文件创建DLL文件.我已经在其他项目中尝试了DLL文件,并且效果很好.

这是我的项目的片段:

Hi guys, I need your helps. Right now, I working on a C# project, which is compression data using Huffman methods. Since there isn''t a code for Huffman encoding and decoding (string) I decide to create a DLL file from vb6.0 file. I have try the DLL file in different project, and it is work well.

Here is the snippet of my project :

OutHuf = OutHuf + " " + Convert.ToString(Huff.EncodeString(ref DCT.RLEString));

DCT.InputDecomp = deHuff.DecodeString(ref OutHuf);//error on this line



当我调试项目时,它返回并显示以下错误:索引超出数组异常,其他信息:下标超出范围.

有人有同样的问题吗?感谢您的答复.



when I debug the project, it return with error that said : index out of array exception, Additional information: Subscript out of range.

anyone have same problem? thanks for your response

推荐答案

我认为您需要调试VB6 dll中的源代码.
错误是从那里来的,因此您粘贴在问题中的代码行实际上将无济于事.
I think you need to debug the source code inside the VB6 dll.
The error is coming from there, so the code lines that you have pasted in the question are really not going to help.


可以始终使用RedGate和Windows中著名的反射器将其反射到dll中.然后将您的语言更改为C#并导出代码.这样您就可以使用C#中的dame代码,而不必担心vb
Could could always reflect into the dll with the famous reflector from RedGate and then change your language to C# and export the code. Then you''ll be able to work with the dame code in C# and not have to worry about vb


这篇关于索引超出数组异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆