本文介绍了尝试读取或写入受保护的内存!的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的程序包含以下代码:

my program includes the following code:

try
{
    PrivateRichTextBox1.Text = PrivateRichTextBox1.Text + "Me: " + privateMessageTextBox.Text + "\n";
    PrivateRichTextBox1.SelectionStart = PrivateRichTextBox1.Text.Length;
    PrivateRichTextBox1.ScrollToCaret();
}
catch
{
}



它可以完美运行,但有时该程序只是在行上停止:



it works perfectly but sometimes the program just stops on the line:

PrivateRichTextBox1.Text = PrivateRichTextBox1.Text + "Me: " + privateMessageTextBox.Text + "\n";



并给我这个错误:
尝试读取或写入受保护的内存.这通常表明其他内存已损坏.

这意味着什么 ???我应该怎么做才能克服此错误??

在此先感谢:)



and give me this error:
attempted to read or write protected memory.this is often an indication that other memory is corrupt.

what does that mean ??? what should I do to overcome this error???

thanks in advance :)

推荐答案



这篇关于尝试读取或写入受保护的内存!的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-12 02:48