Appendix A. Answers to the Test Your Knowledge Questions

This appendix has the answers to the questions in the Test Your Knowledge section at the end of each chapter.

Chapter 1 – Hello, C#! Welcome, .NET Core!

  1. Why can a programmer use different languages to write applications that run on .NET?

    Multiple languages are supported on .NET because each one has a compiler that translates the source code into IL (intermediate language) code. This IL code is then compiled to native CPU instructions at runtime by the CLR.

  2. What do you type at the Command Prompt to compile C#?
    • For .NET Framework, we type csc sourcecode.cs
    • For .NET Core using .NET CLI in a folder with a project.json file, we type dotnet build
  3. What is the Visual Studio 2015 keyboard shortcut to save, ...

Get C# 6 and .NET Core 1.0: Modern Cross-Platform Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.