Is C # an interpreted language?

Sergio23 271 Reputation points
2021-08-24T06:24:37.307+00:00

C # is an interpreted language, therefore slower than C or C ++.
Why use C Sharp?

C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,012 questions
{count} votes

Accepted answer
  1. Sam of Simple Samples 5,546 Reputation points
    2021-08-24T18:31:59.893+00:00

    In the context of computer languages, there is no official (or standard) definition of compile, translate and interpret.

    Like Java, C# provides binary portability. See Slashdot | Interviews | C++ Answers From Bjarne Stroustrup (I assume you know who Bjarne Stroustrup is). In that he says:

    The technical hardest problem is probably the lack of a C++ binary interface (ABI).

    C and C++ do not have a binary interface, therefore they do not provide binary portability.

    As has been said, C# is compiled into IL (providing binary portability) then during execution the IL is compiled into machine code. Since it becomes machine language during execution, it is usually as efficient as C++.

    Note that C++ is not used for websites, I assume due to the security risk of the machine language.

    1 person found this answer helpful.

5 additional answers

Sort by: Most helpful
  1. Castorix31 85,881 Reputation points
    2021-08-24T06:29:47.687+00:00

    No, it is compiled to IL :
    What is "managed code"?
    Is C# interpreted?

    1 person found this answer helpful.
    0 comments No comments

  2. Duane Arnold 3,211 Reputation points
    2021-08-24T09:15:07.457+00:00

    C# is a compiled language. C# is a managed code language, which makes it slower than an unmangaed language like C or C++. However, C++.NET is a managed code language.

    C# is an ECMA standard, which is not owned or controlled by Microsoft. Microsoft is just one company the the ECMA committee that controls C#.

    A interpretive language would be something like JavaScript.


  3. Karen Payne MVP 35,436 Reputation points
    2021-08-24T10:59:54.72+00:00

    Why is C#? Well it depends on what type of application you are writing, for instance, writing a data centric application C# would be the way to go while writing drivers one would be better using C++. Even when writing interactive code Read–Eval–Print Loop (REPL) C# is compiled as per the example below via VS2019, C# Interactive.

    Gif is set to run once to see again hit browser refresh.
    125967-interactive1.gif

    0 comments No comments

  4. Sergio23 271 Reputation points
    2021-08-26T04:39:02.237+00:00

    Thank you SimpleSamples
    Your answer is satisfactory

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.