共用方式為


CopyTextCommand(String) 構造函數

定義

命名空間: Microsoft.CommandPalette.Extensions.Toolkit

初始化 CopyTextCommand 類的新實例,將命令文本設置為 text 參數,將其名稱設置為“Copy”,並添加一個圖示。

public CopyTextCommand(string text)
    {
        Text = text;
        Name = "Copy";
        Icon = new IconInfo("\uE8C8");
    }

參數

text字串

要複製到剪貼簿的文字。 此參數用於設置命令的 Text 屬性。