How to check Data Set In The Clipboard
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开发者_如何学Python 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...
If you're putting 30MB into the Clipboard, you might want to explore other places to store the data. Can you pass it or access it from the other place(s) that need it? Can it be stored in some form of temp location (sql, file, etc) and read/deleted?
精彩评论