EN
Compiler - online c# compiler test
4
points
// ONLINE-RUNNER:browser;
<!doctype html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.0.0/jquery.min.js"></script>
</head>
<body>
<form action="https://rextester.com/rundotnet/Run" method="POST" target="compiler">
<input name="LanguageChoiceWrapper" value="1" />
<input name="EditorChoiceWrapper" value="1" />
<input name="LayoutChoiceWrapper" value="1" />
<textarea name="Program">
//Rextester.Program.Main is the entry point for your code. Don't change it.
//Compiler version 4.0.30319.17929 for Microsoft (R) .NET Framework 4.5
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;
namespace Rextester
{
public class Program
{
public static void Main(string[] args)
{
//Your code goes here
Console.WriteLine("Hello, world!");
}
}
}
</textarea>
<!--
LanguageChoiceWrapper=1
EditorChoiceWrapper=1
LayoutChoiceWrapper=1
Program=%2F%2FRextester.Program.Main+is+the+entry+point+for+your+code.+Don\'t+change+it.%0D%0A%2F%2FCompiler+version+4.0.30319.17929+for+Microsoft+(R)+.NET+Framework+4.5%0D%0A%0D%0Ausing+System%3B%0D%0Ausing+System.Collections.Generic%3B%0D%0Ausing+System.Linq%3B%0D%0Ausing+System.Text.RegularExpressions%3B%0D%0A%0D%0Anamespace+Rextester%0D%0A%7B%0D%0A++++public+class+Program%0D%0A++++%7B%0D%0A++++++++public+static+void+Main(string%5B%5D+args)%0D%0A++++++++%7B%0D%0A++++++++++++%2F%2FYour+code+goes+here%0D%0A++++++++++++Console.WriteLine(%22Hello%2C+world\u0021%22)%3B%0D%0A++++++++%7D%0D%0A++++%7D%0D%0A%7D
Input=
ShowWarnings=false
Privacy=
PrivacyUsers=
Title=
SavedOutput=
WholeError=
WholeWarning=
StatsToSave=
CodeGuid=
IsInEditMode=False
IsLive=False
-->
<input type="submit" value="Compile and Run" />
</form>
<iframe name="compiler"></iframe>
<script>
/*
curl 'https://rextester.com/rundotnet/Run'
-H 'Connection: keep-alive'
-H 'Pragma: no-cache'
-H 'Cache-Control: no-cache'
-H 'Accept: text/plain, *\/*; q=0.01'
-H 'Origin: https://rextester.com'
-H 'X-Requested-With: XMLHttpRequest'
-H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97 Safari/537.36'
-H 'Content-Type: application/x-www-form-urlencoded; charset=UTF-8'
-H 'Sec-Fetch-Site: same-origin'
-H 'Sec-Fetch-Mode: cors'
-H 'Referer: https://rextester.com/l/csharp_online_compiler'
-H 'Accept-Encoding: gzip, deflate, br'
-H 'Accept-Language: en-US,en;q=0.9,pl;q=0.8'
--data $'LanguageChoiceWrapper=1&EditorChoiceWrapper=1&LayoutChoiceWrapper=1&Program=%2F%2FRextester.Program.Main+is+the+entry+point+for+your+code.+Don\'t+change+it.%0D%0A%2F%2FCompiler+version+4.0.30319.17929+for+Microsoft+(R)+.NET+Framework+4.5%0D%0A%0D%0Ausing+System%3B%0D%0Ausing+System.Collections.Generic%3B%0D%0Ausing+System.Linq%3B%0D%0Ausing+System.Text.RegularExpressions%3B%0D%0A%0D%0Anamespace+Rextester%0D%0A%7B%0D%0A++++public+class+Program%0D%0A++++%7B%0D%0A++++++++public+static+void+Main(string%5B%5D+args)%0D%0A++++++++%7B%0D%0A++++++++++++%2F%2FYour+code+goes+here%0D%0A++++++++++++Console.WriteLine(%22Hello%2C+world\u0021%22)%3B%0D%0A++++++++%7D%0D%0A++++%7D%0D%0A%7D&Input=&ShowWarnings=false&Privacy=&PrivacyUsers=&Title=&SavedOutput=&WholeError=&WholeWarning=&StatsToSave=&CodeGuid=&IsInEditMode=False&IsLive=False' --compressed
*/
$(document).ready(function() {
var code = '' +
'//Rextester.Program.Main is the entry point for your code. Don\'t change it.\n' +
'//Compiler version 4.0.30319.17929 for Microsoft (R) .NET Framework 4.5\n' +
'\n' +
'using System;\n' +
'using System.Collections.Generic;\n' +
'using System.Linq;\n' +
'using System.Text.RegularExpressions;\n' +
'\n' +
'namespace Rextester\n' +
'{\n' +
' public class Program\n' +
' {\n' +
' public static void Main(string[] args)\n' +
' {\n' +
' //Your code goes here\n' +
' Console.WriteLine("Hello, world!");\n' +
' }\n' +
' }\n' +
'}\n';
$.ajax({
type: 'POST',
url: 'https://rextester.com/rundotnet/Run',
data: {
LanguageChoiceWrapper: 1,
EditorChoiceWrapper: 1,
LayoutChoiceWrapper: 1,
Program: code
},
success: function (data) {
alert(data)
},
error: function (error) {
alert(error.status);
}
});
});
</script>
</body>
</html>