Is C# written in C++ underneath?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

Very curious of the role of C++ today, was wondering if C# was actually
written in C++.
 
Juan Dent said:
Very curious of the role of C++ today, was wondering if C# was actually
written in C++.

C# itself is just a language. Languages themselves aren't written in
anything. Do you mean the compiler? Or the CLR? Or the framework?
 
Very curious of the role of C++ today, was wondering if C# was actually written in C++.

for the Framework/Runtime, have a look at the source of SSCLI 'Rotor'
http://www.microsoft.com/downloads/details.aspx?FamilyId=8C09FD61-3F26-4555-AE17-3121B4F51D4D
(many parts are very comparable to the real .NET source)

AFAIK:
The runtime is mostly in C++.
Many Framework classes/methods are written in C# only, others are 'dual' using C++ helper/runtime methods.

The Microsoft C# compiler was written in C++.

The Mono
http://www.mono-project.com/CSharp_Compiler
C# compiler was written in C# itself.
 
Why the MS C# compiler was NOT written in C#?

Assuming Microsoft's C# compiler was the first C# compiler to exist,
what compiler would they have used to compile a C# version of the C#
compiler?
 
Reminds me of an interview I once read with Bjarne Stroustrup where he
mentioned he wrote the first C++ compiler in C++. He added a bunch of
macros in C to take C++ code and transform it to C. He then wrote the
compiler in C++, used the macros to turn it to C, compiled it and then used
the resulting compiler to compile the C++.
 
Back
Top