Skip to content

Instantly share code, notes, and snippets.

@VitaliiTsilnyk
Created April 16, 2012 13:30
Show Gist options
  • Save VitaliiTsilnyk/2398842 to your computer and use it in GitHub Desktop.
Save VitaliiTsilnyk/2398842 to your computer and use it in GitHub Desktop.
hello-world.bat
/*
@echo off && set oname="%TMP%\bat2cs-%RANDOM%.exe"
%WinDir%\Microsoft.NET\Framework\v2.0.50727\csc.exe /out:"%oname%" %0 && cls && "%oname%" && del "%oname%" && exit
*/
using System;
class HelloWorld
{
static void Main()
{
Console.WriteLine("Hello, World!");
Console.WriteLine("I'm a C# script! And I'm in the .bat file!");
Console.ReadKey();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment