Created
December 7, 2019 06:16
-
-
Save decriptor/32ebe7ecb63b513bd62c0971e93bd7dc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Foo.csproj: | |
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop"> | |
<PropertyGroup> | |
<OutputType>exe</OutputType> | |
<TargetFramework>netcoreapp3.1</TargetFramework> | |
<UseWindowsForms>true</UseWindowsForms> | |
</PropertyGroup> | |
</Project> | |
Program.cs: | |
using System; | |
using System.Windows.Forms; | |
namespace tmp | |
{ | |
static class Program | |
{ | |
/// <summary> | |
/// The main entry point for the application. | |
/// </summary> | |
[STAThread] | |
static void Main() | |
{ | |
Console.WriteLine("Say something and it will be copied to the clipboard"); | |
var something = Console.ReadLine(); | |
Clipboard.SetText(something); | |
Console.Read(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment