0

Is assembly in C# similar to the translation unit in C++?

In C++, one .h, .cpp file is called a translation unit (preprocess finished state). Equally, is one .cs file called assembly in C#?

Or is that the same as assembly in C++'s low level language?

1201ProgramAlarm
  • 32,384
  • 7
  • 42
  • 56
  • 1
    Does [this](https://stackoverflow.com/questions/1362242/what-exactly-is-an-assembly-in-c-sharp-or-net) answer your question? Each .cs file is called a _compilation unit_. Assemblies are something different. – Sweeper May 30 '20 at 13:46
  • https://learn.microsoft.com/en-us/dotnet/csharp/programming-guide/classes-and-structs/access-modifiers On the page above, did 'other assemblies' refer to other class? –  May 30 '20 at 13:57
  • No, if they want to say "other classes", they would have said "other classes"... Did you read the linked post? If that answered your question, please tell me and I'll close this as a duplicate. If not, please explain how your question is different. – Sweeper May 30 '20 at 13:58
  • I understood roughly. Is assembly an abstract word that includes dll, exe, and also class? –  May 30 '20 at 14:06
  • Yes, the term is overloaded (as many are in programming). C#/.NET use the term assembly to mean a collection of classes/interfaces packaged in compiled form, "an assembly", "two assemblies", i.e. a noun. It is a different use of the term than assembly language, which is the human readable version of machine code of various processors, often abbreviated as "assembly" (plural would be assembly languages). – Erik Eidt May 30 '20 at 14:49
  • Thanks! Erik Eidt and Sweeper. Solved! –  May 30 '20 at 14:53

0 Answers0