The Common Language Runtime (CLR) is the virtual machine component of Microsoft's .NET framework and is responsible for managing the execution of .NET programs.
Questions tagged [clr]
25 questions
45
votes
4 answers
Why are structs and classes separate concepts in C#?
While programming in C#, I stumbled upon a strange language design decision that I just can't understand.
So, C# (and the CLR) has two aggregate data types: struct (value-type, stored on the stack, no inheritance) and class (reference-type, stored…

Mints97
- 789
- 6
- 12
18
votes
2 answers
Is IronScheme complete enough or stable enough to be worth learning?
IronScheme is mentioned on Wikipedia as a successor to a failed project called IronLisp, bringing Lisp to CLR and .NET, the way Clojure does for the JVM.
Does anyone have experience with this language? It looks fairly complete (99%) but I'm not sure…
user28988
13
votes
4 answers
How are virtual methods slower in C#?
I read that virtual calls make the code slower than calling non-virtual ones in C#.
However, the IL instruction for both are the same callvirt except in cases where base.somemethod() is called.
So how does virtual method hurt performance?

jtkSource
- 249
- 1
- 2
- 8
11
votes
4 answers
Is the C# EventHandler designed the wrong way?
State of the union:
C# Events/Eventhandlers are:
blocking
throwing Exceptions
sequential
deterministic executed in order
MulticastDelegates
a handler is always dependent on the behavior of the handlers registered earlier
Actually they are pretty…

juwens
- 259
- 2
- 7
9
votes
4 answers
Constants in C#
Why does the compiler store constant values in the assembly metadata?
Are they directly embedded to Intermediate Language code from the assembly metadata?

Arun
- 477
- 1
- 3
- 14
8
votes
1 answer
What language is the CLR written in?
Just out of curiosity, what language is the CLR written in? I read on the Java Virtual Machine wikipedia entry that it is programmed in C++; is this the same for the CLR?
Sorry if this is off-topic, I didn't feel that this question was technical…

Aralox
- 191
- 7
7
votes
1 answer
.NET BCL Change Analysis - Uses Beyond Sating Curiosity
This is part of a series of questions which focuses on the Abstraction Project, which aims to abstract the concepts used in language design in the form of a framework. There is a sister project to Abstraction called OILexer, which aims to…

Allen Clark Copeland Jr
- 401
- 2
- 16
6
votes
4 answers
Is it possible to implement an infinite IEnumerable without using yield with only C# code?
Motivation
The main idea is to explore and understand the limits of how far one can go with the basic LINQ primitives (Select, SelectMany, Concat, etc.). These primitives can all be considered functional operations on a theoretical sequence type.…

sinelaw
- 221
- 3
- 8
6
votes
2 answers
What does "because IL offers no instructions to manipulate registers, it is easy for people to create new languages" mean?
I am reading CLR via C# and came across this sentence in the first chapter and I did not understand what exactly it meant.
Full line here:
because IL offers no instructions to manipulate registers, it is easy for people to create new languages and…

Animesh
- 165
- 1
- 12
6
votes
4 answers
Writing a new programming language - when and how to bootstrap datastructures?
I'm in the process of writing my own programming language which, thus far, has been going great in terms of what I set out to accomplish. However, now, I'd like to bootstrap some pre-existing data structures and/or objects. My problem is that I'm…

OnResolve
- 421
- 3
- 10
4
votes
1 answer
How to separate "unmanaged" and "managed" code in my C++/CLI project
I am developing a project using C++/CLI and WinForms. It is a geometry project, which is why I have to use C++/CLI, because of the C++ geometry library CGAL. I chose to use WinForms for the UI because compared to the other C++/CLI windows UI options…

Simon H
- 151
- 4
4
votes
2 answers
What algo/design pattern do i need to keep limited time series data constantly updated?
I'm a hobbyist coder; never worked professionally. I am not looking for anyone to write code for me, but I need to know how to approach this problem and, perhaps, ideas for further research. This problem is an outgrowth of my kid's science project…

LeeRoy
- 49
- 3
4
votes
3 answers
Appropriate use of SQL CLR
We have some back end processes that runs* on our sql server (SQL Server), they involve processing claims. This requires both data manipulation (biz logic) and data read/write to tables. The biz logic contained should never be used by any of our…

Chris L
- 153
- 7
4
votes
1 answer
Build a native dll or .net dll to be used independently in either set-up
Here's a simple question (kind of), but I'm having a hard time taking a decision. First, a history on how I came to have this problem. In my new job, we need to use a third party API to communicate with their proprietary database (this is…

Shuryno
- 143
- 4
4
votes
4 answers
What has been your experience with SQL CLR for complex business logic?
So I thought I had a perfect use-case for a CLR SQL Procedure. I've search the Net for perhaps a similar example where data is retrieved, records added and updated. I have not looked at a SQL CLR procedure for awhile, but since it was released in…

codeputer
- 141
- 4