1
1
mirror of https://github.com/theoludwig/programming-challenges.git synced 2024-12-08 00:45:29 +01:00

feat(languages): add C# support

This commit is contained in:
divlo 2021-06-24 22:04:28 +02:00
parent 677a55a9d8
commit 719058b2ff
No known key found for this signature in database
GPG Key ID: 185ED2F15F104E52
8 changed files with 52 additions and 1 deletions

View File

@ -21,6 +21,7 @@ Each challenge has its **solutions**, its **instructions** and **input/output ex
### ✅ Programming languages available
- [C/C++ (gcc)](https://gcc.gnu.org/)
- [C# (.NET Core)](https://docs.microsoft.com/en-us/dotnet/csharp/)
- [Dart](https://dart.dev/)
- [JavaScript/TypeScript (Node.js)](https://nodejs.org/)
- [Python](https://www.python.org/)

View File

@ -0,0 +1,3 @@
# hello-world/cs/function
Created by [@Divlo](https://github.com/Divlo) on 24 June 2021.

View File

@ -0,0 +1,15 @@
namespace Solution
{
class Program
{
static void Main()
{
string line;
while ((line = System.Console.ReadLine()) != null)
{
System.Console.WriteLine($"Hello, {line}!");
}
}
}
}

View File

@ -0,0 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net5.0</TargetFramework>
</PropertyGroup>
</Project>

View File

@ -6,7 +6,7 @@ import { Solution } from './Solution'
const git = simpleGit()
const solutionsRegex = new RegExp(
/challenges\/[\s\S]*\/solutions\/(c|cpp|dart|javascript|python|rust|typescript)\/[\s\S]*\/solution.(c|cpp|dart|js|py|rs|ts)/
/challenges\/[\s\S]*\/solutions\/(c|cpp|cs|dart|javascript|python|rust|typescript)\/[\s\S]*\/(solution|Solution).(c|cpp|cs|dart|js|py|rs|ts)/
)
class GitAffected {

View File

@ -0,0 +1,5 @@
FROM mcr.microsoft.com/dotnet/sdk:5.0
WORKDIR /usr/src/app
COPY ./ ./
RUN dotnet restore
ENTRYPOINT ["dotnet", "run"]

View File

@ -0,0 +1,15 @@
namespace Solution
{
class Program
{
static void Main()
{
string line;
while ((line = System.Console.ReadLine()) != null)
{
System.Console.WriteLine($"Hello, {line}!");
}
}
}
}

View File

@ -0,0 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net5.0</TargetFramework>
</PropertyGroup>
</Project>