HomeSearch

C# Compile Time Error

This C# article describes compile-time errors. These errors are helpful.
Compile-time error. Errors are typically a bad thing in computer programming. One kind of error, a compile-time error, is different. It forces you to improve the quality of your software before it ever causes serious trouble.

Note: Programmers are human beings and they make mistakes in their code. Even the best programmers make errors.

Note 2: Sometimes these mistakes are simple typos (bad tokens) and sometimes they are caused by a misunderstanding of the language.

Token
Intro. Some languages are not compiled. With programs in these languages, you can actually run a program that has syntax or other errors in it. An error might only be found in a specific case that occurs while it is running.

So: A program with errors may escape notice and be deployed in an important situation.

Compile-time. In languages that are compiled, like C#, the compiler will validate the program in many ways. It will only accept programs that have the correct syntax. Programs must use the object model correctly. Every method must exist.
With compile-time errors, if a program is not essentially correct, it cannot be compiled. Thus, no program with serious errors can be deployed. If a program compiles correctly, it is guaranteed to be correct at least in a basic way.
Summary. Compile-time errors improve the quality of software. Code that has serious errors is never be allowed to execute. This reduces the possibility that a program that is wrong will be used in an important project.

Tip: Compile-time errors, in addition to performance, are a key benefit of compiled languages.

© 2007-2019 Sam Allen. Every person is special and unique. Send bug reports to info@dotnetperls.com.
Home
Dot Net Perls