C# : Use in codechef ?

Can C#(C sharp) will be use in doing programming ques and challenges,??
and if yes which compilers??
pls reply.

Yes, C# can be used. If you go on the submit page of any problem (eg http://www.codechef.com/submit/TEST) , you can see allowed languages in the drop down below editor window.

gmcs 2.0.1 is the compiler used for testing on Codechef (on linux, package name is gmcs, do apt-get install of gmcs and mono packages, then do gmcs test.cs and run as mono test.exe)

If you test C# on windows, that’ll also work here. You can work in Visual Studio, or use windows C# compiler separately (compile from terminal as csc.exe test.cs and run as test.exe). To do that, include location to csc.exe in your path variable (located at something like C:\Windows\Microsoft.NET\Framework\vX.XX) in windows, and you’re good to go!

Hope this helps :slight_smile:

1 Like

thx piyush kumar

C# can be used. Unfortunately, gmcs 2.0.1 targets C# 2.0. So you cannot use namespaces like System.Linq. So, C# programs targeting higher .NET version might yield errors on codechef.