Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
C# 7 and .NET Core: Modern Cross-Platform Development

You're reading from   C# 7 and .NET Core: Modern Cross-Platform Development Create powerful cross-platform applications using C# 7, .NET Core, and Visual Studio 2017 or Visual Studio Code

Arrow left icon
Product type Paperback
Published in Mar 2017
Publisher
ISBN-13 9781787129559
Length 594 pages
Edition 2nd Edition
Languages
Tools
Arrow right icon
Toc

Table of Contents (24) Chapters Close

C# 7 and .NET Core: Modern Cross-Platform Development - Second Edition
Credits
About the Author
About the Reviewer
www.PacktPub.com
Customer Feedback
Preface
1. Hello, C#! Welcome, .NET Core! FREE CHAPTER 2. Speaking C# 3. Controlling the Flow, Converting Types, and Handling Exceptions 4. Using .NET Standard Types 5. Debugging, Monitoring, and Testing 6. Building Your Own Types with Object-Oriented Programming 7. Implementing Interfaces and Inheriting Classes 8. Working with Databases Using the Entity Framework Core 9. Querying and Manipulating Data with LINQ 10. Working with Files, Streams, and Serialization 11. Protecting Your Data 12. Improving Performance and Scalability with Multitasking 13. Building Universal Windows Platform Apps Using XAML 14. Building Web Applications Using ASP.NET Core MVC 15. Building Mobile Apps Using Xamarin.Forms and ASP.NET Core Web API 16. Packaging and Deploying Your Code Cross-Platform Answers to the Test Your Knowledge Questions

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


  1. Why can a programmer use different languages, for example C# and F#, to write applications that run on .NETCore?

    • Multiple languages are supported on .NET Core 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 prompt to build and execute C# source code?

    • Using .NET Core CLI in a folder with a ProjectName.csproj file, we type dotnet run.

  3. What is the Visual C# developer settings keyboard shortcut to save, compile, and run an application without attaching the debugger?

    • Ctrl + F5.

  4. What is the Visual Studio Code keyboard shortcut to view the Integrated Terminal?

    • Ctrl + ` (back tick).

  5. Is Visual Studio 2017 better then Visual Studio Code?

    • No. Each is optimized for different tasks. Visual Studio 2017 is large, heavy-weight, and can create applications with graphical user interfaces, for example WPF, UWP, and Xamarin mobile apps, but is only available on Windows. Visual Studio Code is smaller, lighter-weight, command line and code-focused, and available cross-platform.

  6. Is .NET Core better than .NET Framework?

    •  It depends on what you need. .NET Core is a slimmed down, cross-platform version of the more full-featured, mature .NET Framework.

  7. How is .NET Native different from .NET Core?

    • .NET Native is an ahead-of-time compiler that can produce native code assemblies that have better performance and reduced memory footprint, and it has its .NET assemblies statically linked, which removes its dependency on CoreCLR.

  8. What is .NET Standard and why is it important?

    •  .NET Standard is an API that future versions of .NET Framework, .NET Core, and Xamarin will implement to provide a single, standard API that developers can learn and target.

  9. What is the difference between Git and GitHub?

    • Git is a source code management platform. GitHub is a popular web service that implements Git.

  10. What is the name of the entry point method of a .NET console application and how should it be declared?

            public static void Main() // minimum 
            public static int Main(string[] args) // recommended 
    
    • Its name is Main and the preceding code is how it is declared. An optional string array for command-line arguments and a return type of int are recommended, but they are not required.

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime
Visually different images