-
-
Notifications
You must be signed in to change notification settings - Fork 5
Board
Taiizor edited this page Mar 1, 2023
·
6 revisions
The Board
class provides functions to manage a clipboard object.
Copies the given object to the clipboard.
public static void Copy(object Value)
Parameters:
-
Value
: The object to copy to the clipboard.
Copies the given object to the clipboard asynchronously.
public static Task CopyAsync(object Value)
Parameters:
-
Value
: The object to copy to the clipboard.
Retrieves the object from the clipboard.
public static object Paste(bool Clear = false, object Back = null)
Parameters:
-
Clear
(optional): Iftrue
, clears the clipboard after retrieving the object. Default isfalse
. -
Back
(optional): The object to return if the clipboard is empty. Default isnull
.
Retrieves the object from the clipboard asynchronously.
public static Task<object> PasteAsync(bool Clear = false, object Back = null)
Parameters:
-
Clear
(optional): Iftrue
, clears the clipboard after retrieving the object. Default isfalse
. -
Back
(optional): The object to return if the clipboard is empty. Default isnull
.
Example Usage:
// Copy a string to the clipboard
string myString = "Hello, world!";
Board.Copy(myString);
// Retrieve the string from the clipboard
string retrievedString = (string)Board.Paste();
Console.WriteLine(retrievedString);
Note: These functions use an object
to store the clipboard content, which can hold any type of object. If you store a value type (such as an int
or bool
) in the clipboard, be sure to cast it back to the correct type when you retrieve it.
- Tax
- Url
- Web
- Ping
- Port
- Text
- Time
- Hash
- Word
- Color
- Speed
- Lottery
- Storage
- Browser
- Unicode
- Password
- JavaScript
- Cryptology
- Typography
- Temperature
- Compression
- Decompression
- Cascading Style Sheets
- JavaScript Object Notation
- Hypertext Markup Language
- Extensible Markup Language
- Extensible HyperText Markup Language