0

Im copying data (text) to a clipboard but the data that I'm copying to the clipboard has a length of 30,500,000. This text is stored in a StringBuilder.

These are may codes:

        StringBuilder sbText = new StringBuilder();

        // Append text to sbText here!!!

        Clipboard.SetDataObject(sbText.ToString()); // In this line sbText.Length is equal to 30,500,000.

After this I tried to paste the data but I can't (no data pasted!!!).

I understand that there is a limit in Clipboard size based on the free RAM of the pc.

Is there a way to copy/paste this much data in clipboard without error? Is there a way to check if the clipboard size is not enough to do this operation?

Please share some light...

4

1 回答 1

2

如果您将 30MB 放入剪贴板,您可能想要探索其他地方来存储数据。您可以通过它或从其他需要它的地方访问它吗?它可以存储在某种形式的临时位置(sql、文件等)中并读取/删除吗?

于 2010-02-10T09:35:13.140 回答