Skip to content

Commit 29c5c72

Browse files
committed
Added support for C# using dotnet CLI with dotnet script
1 parent c6eea33 commit 29c5c72

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

examples/code_blocks.md

+9
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ Currently supported languages:
2323
* `swift`
2424
* `dart`
2525
* `v`
26+
* `csharp`
2627
<!-- * `secret` -->
2728

2829
---
@@ -192,3 +193,11 @@ object Main extends App {
192193
println("Hello")
193194
}
194195
```
196+
197+
---
198+
199+
### C#
200+
201+
```csharp
202+
Console.WriteLine("Hello, world!");
203+
```

internal/code/languages.go

+5
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ const (
3636
V = "v"
3737
Scala = "scala"
3838
Haskell = "haskell"
39+
CSharp = "csharp"
3940
)
4041

4142
// Languages is a map of supported languages with their extensions and commands
@@ -129,4 +130,8 @@ var Languages = map[string]Language{
129130
Extension: "hs",
130131
Commands: cmds{{"runghc", "<file>"}},
131132
},
133+
CSharp: {
134+
Extension: "csx",
135+
Commands: cmds{{"dotnet", "script", "<file>"}},
136+
},
132137
}

0 commit comments

Comments
 (0)