Skip to content

Commit

Permalink
Merge pull request #45 from abduelhamit/patch-1
Browse files Browse the repository at this point in the history
Add C# template
  • Loading branch information
igor-petruk authored Jun 6, 2024
2 parents 20f0656 + 39e7978 commit b4ba532
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions data/templates/csharp.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/usr/bin/env scriptisto

// scriptisto-begin
// script_src: Program.cs
// target_bin: bin/Release/net8.0/script
// build_cmd: dotnet build -c Release script.csproj
// files:
// - path: script.csproj
// content: |
// <Project Sdk="Microsoft.NET.Sdk">
// <PropertyGroup>
// <OutputType>Exe</OutputType>
// <TargetFramework>net8.0</TargetFramework>
// <ImplicitUsings>enable</ImplicitUsings>
// <Nullable>enable</Nullable>
// </PropertyGroup>
// </Project>
// scriptisto-end

// See https://aka.ms/new-console-template for more information

var name = Environment.GetEnvironmentVariable("USER");
Console.BackgroundColor = ConsoleColor.DarkBlue;
Console.ForegroundColor = ConsoleColor.White;
Console.Write("Hello");
Console.ResetColor();
Console.WriteLine($", {name}!");

0 comments on commit b4ba532

Please sign in to comment.