Skip to main content

Questions tagged [c#]

16 votes
1 answer
2k views

I wrote a simple recursive‑descent parser for my DSL, but every edit in vscode forces me to reparse the whole file. Roslyn (the C# compiler) also uses a hand-written recursive-descent parser yet ...
Rui Gonçalves's user avatar
4 votes
2 answers
448 views

I'm learning about how modern compilers like Roslyn handle symbol tables and type information. From what I understand, Roslyn uses immutable data structures to represent symbols, which helps ensure ...
Rui Gonçalves's user avatar
5 votes
1 answer
1k views

I have a question about a C# language design. Let's have a following code: ...
TN.'s user avatar
  • 159
3 votes
2 answers
414 views

In C++, templated code are compiled multiple times according to the parameters. But I just realized how restrictive C# generics are: The interfaces you are using on variables in a generic parameter ...
user23013's user avatar
  • 3,314
8 votes
2 answers
2k views

Delegates have been part of the design of C# for decades. But would it be wrong to say that over time, all the uses of delegates have become better achieved through other means? (Or, dramatically ...
Eldritch Conundrum's user avatar
14 votes
1 answer
3k views

I have recently been making my own programming language and I am finding most concepts easy to understand, however I'm not sure how to implement async/await in my language. ATM, I'm using C# to create ...
InvaderIzzy's user avatar
5 votes
2 answers
656 views

C# 3.0 introduced extension methods to "enhance" behavior of existing types without interface bloating to avoid modifying/breaking existing interfaces. This was the first time I learned of ...
terrorrussia-keeps-killing's user avatar
16 votes
3 answers
1k views

In C#, events and event listeners have direct support within the language, with event being a keyword, and event declarations being a special kind of member ...
kaya3's user avatar
  • 22.4k