Search code examples
.netdefinition

What is the difference between "compile time" and "run time"?


I do not understand what is meant by the terms "compile time" and "run time" (or "runtime").

I'm also a bit confused about what "value type" and "reference type" mean, and how they relate to the 'times mentioned above.

Would someone please explain these things?


Solution

  • "Compile time" is when you build your code - when the compiler converts your source code into IL.

    "Runtime" is when your code is executed - for ASP.NET, when a page request is made. (Personally I prefer the term "execution time" to distinguish between that and "the Common Language Runtime (CLR)" - aka the virtual machine.)

    Value types and reference types are an entirely separate concept, but I have an article about them which you may find useful.