• Complain

Joseph Albahari - C# 9.0 Pocket Reference: Instant Help for C# 9.0 Programmers

Here you can read online Joseph Albahari - C# 9.0 Pocket Reference: Instant Help for C# 9.0 Programmers full text of the book (entire story) in english for free. Download pdf and epub, get meaning, cover and reviews about this ebook. year: 2021, publisher: ‎ OReilly Media, genre: Computer. Description of the work, (preface) as well as reviews are available. Best literature library LitArk.com created for fans of good reading and offers a wide selection of genres:

Romance novel Science fiction Adventure Detective Science History Home and family Prose Art Politics Computer Non-fiction Religion Business Children Humor

Choose a favorite category and find really read worthwhile books. Enjoy immersion in the world of imagination, feel the emotions of the characters or learn something new for yourself, make an fascinating discovery.

Joseph Albahari C# 9.0 Pocket Reference: Instant Help for C# 9.0 Programmers
  • Book:
    C# 9.0 Pocket Reference: Instant Help for C# 9.0 Programmers
  • Author:
  • Publisher:
    ‎ OReilly Media
  • Genre:
  • Year:
    2021
  • Rating:
    3 / 5
  • Favourites:
    Add to favourites
  • Your mark:
    • 60
    • 1
    • 2
    • 3
    • 4
    • 5

C# 9.0 Pocket Reference: Instant Help for C# 9.0 Programmers: summary, description and annotation

We offer to read an annotation, description, summary or preface (depends on what the author of the book "C# 9.0 Pocket Reference: Instant Help for C# 9.0 Programmers" wrote himself). If you haven't found the necessary information about the book — write in the comments, we will try to find it.

Looking for quick answers for using C# 9.0? This tightly focused and practical guide tells you exactly what you need to know without long intros or bloated samples. Succinct and easy to browse, this pocket reference is an ideal quick source of information. If you know Java, C++, or an earlier C# version, this guide will help you get rapidly up to speed.All programs and code snippets are available as interactive samples in LINQPad. You can edit these samples and instantly see the results without needing to set up projects in Visual Studio. Written by the authors of C# 9.0 in a Nutshell, this pocket reference covers:* C# fundamentals and features new to C# 9.0* Advanced topics like operator overloading, type constraints, nullable types, operator lifting, closures, patterns, and asynchronous functions* LINQ: sequences, lazy execution, standard query operators, and query expressions* Unsafe code and pointers, custom attributes, preprocessor directives, and XML documentation

Joseph Albahari: author's other books


Who wrote C# 9.0 Pocket Reference: Instant Help for C# 9.0 Programmers? Find out the surname, the name of the author of the book and a list of all author's works by series.

C# 9.0 Pocket Reference: Instant Help for C# 9.0 Programmers — read online for free the complete book (whole text) full work

Below is the text of the book, divided by pages. System saving the place of the last page read, allows you to conveniently read the book "C# 9.0 Pocket Reference: Instant Help for C# 9.0 Programmers" online for free, without having to search again every time where you left off. Put a bookmark, and you can go to the page where you finished reading at any time.

Light

Font size:

Reset

Interval:

Bookmark:

Make
C# 9.0 Pocket Reference

by Joseph Albahari and Ben Albahari

Copyright 2021 Joseph Albahari and Ben Albahari. All rights reserved.

Printed in the United States of America.

Published by OReilly Media, Inc. , 1005 Gravenstein Highway North, Sebastopol, CA 95472.

OReilly books may be purchased for educational, business, or sales promotional use. Online editions are also available for most titles (http://oreilly.com). For more information, contact our corporate/institutional sales department: 800-998-9938 or corporate@oreilly.com .

  • Acquisitions Editor: Amanda Quinn
  • Development Editor: Corbin Collins
  • Production Editor: Kristen Brown
  • Copyeditor: Charles Roumeliotis
  • Proofreader: James Fraleigh
  • Indexer: WordCo Indexing Services, Inc.
  • Interior Designer: David Futato
  • Cover Designer: Karen Montgomery
  • Illustrator: Kate Dullea
  • January 2021: First Edition
Revision History for the First Edition
  • 2021-01-13: First Release

See https://oreil.ly/c9pr_1 for release details.

The OReilly logo is a registered trademark of OReilly Media, Inc. C# 9.0 Pocket Reference, the cover image, and related trade dress are trademarks of OReilly Media, Inc.

The views expressed in this work are those of the authors, and do not represent the publishers views. While the publisher and the authors have used good faith efforts to ensure that the information and instructions contained in this work are accurate, the publisher and the authors disclaim all responsibility for errors or omissions, including without limitation responsibility for damages resulting from the use of or reliance on this work. Use of the information and instructions contained in this work is at your own risk. If any code samples or other technology this work contains or describes is subject to open source licenses or the intellectual property rights of others, it is your responsibility to ensure that your use thereof complies with such licenses and/or rights.

978-1-098-10113-8

[LSI]

C# 9.0 Pocket Reference

C# is a general-purpose, type-safe, primarily object-oriented programming language, the goal of which is programmer productivity. To this end, the language balances simplicity, expressiveness, and performance. C# 9 is designed to work with the Microsoft .NET 5 runtime (whereas C# 8 targets .NET Core 3, and C# 7 targets .NET Core 2 and Microsoft .NET Framework 4.6/4.7/4.8).

Note

The programs and code snippets in this book mirror those in Chapters 2 through 4 of C# 9.0 in a Nutshell and are all available as interactive samples in LINQPad. Working through these samples in conjunction with the book accelerates learning in that you can edit the samples and instantly see the results without needing to set up projects and solutions in Visual Studio.

To download the samples, click the Samples tab in LINQPad and then click Download more samples. LINQPad is freego to www.linqpad.net.

A First C# Program

Following is a program that multiplies 12 by 30 and prints the result, 360, to the screen. The double forward slash indicates that the remainder of a line is a comment:

int x = 12 * 30; // Statement 1System.Console.WriteLine (x); // Statement 2

Our program consists of two statements. Statements in C# execute sequentially and are terminated by a semicolon. The first statement computes the expression12 * 30 and stores the result in a variable, named x, whose type is a 32-bit integer (int). The second statement calls the WriteLinemethod on a class called Console, which is defined in a namespace called System. This prints the variable x to a text window on the screen.

.

At the outermost level, types are organized into namespaces. Many commonly used typesincluding the Console classreside in the System namespace. The .NET libraries are organized into nested namespaces. For example, the System.Text namespace contains types for handling text, and System.IO contains types for input/output.

Qualifying the Console class with the System namespace on every use adds clutter. The using directive lets you avoid this clutter by importing a namespace:

using System; // Import the System namespaceint x = 12 * 30;Console.WriteLine (x); // No need to specify System

A basic form of code reuse is to write higher-level functions that call lower-level functions. We can refactor our program with a reusable method called FeetToInches that multiplies an integer by 12, as follows:

using System;Console.WriteLine (FeetToInches (30)); // 360Console.WriteLine (FeetToInches (100)); // 1200int FeetToInches (int feet){int inches = feet * 12; return inches;}

Our method contains a series of statements surrounded by a pair of braces. This is called a statement block.

A method can receive input data from the caller by specifying parameters and output data back to the caller by specifying a return type. Our FeetToInches method has a parameter for inputting feet, and a return type for outputting inches:

int FeetToInches (int feet)...

The literals30 and 100 are the arguments passed to the FeetToInches method.

If a method doesnt receive input, use empty parentheses. If it doesnt return anything, use the void keyword:

using System;SayHello();void SayHello(){ Console.WriteLine ("Hello, world");}

Methods are one of several kinds of functions in C#. Another kind of function we used in our example program was the *operator, which performs multiplication. There are also constructors, properties, events, indexers, and finalizers.

Compilation

The C# compiler compiles source code (a set of files with the .cs extension) into an assembly. An assembly is the unit of packaging and deployment in .NET. An assembly can be either an application or a library. A normal console or Windows application has an entry point, whereas a library does not. The purpose of a library is to be called upon (referenced) by an application or by other libraries..NET 5 itself is a set of libraries (as well as a runtime environment).

Each of the programs in the preceding section began directly with a series of statements (called top-level statements). The presence of top-level statements implicitly creates an entry point for a console or Windows application. (Without top-level statements, a Main method denotes an applications entry pointsee .)

To invoke the compiler, you can either use an integrated development environment (IDE) such as Visual Studio or Visual Studio Code, or call it manually from the command line. To manually compile a console application with .NET, first download the .NET 5 SDK, and then create a new project, as follows:

dotnet new console -o MyFirstProgramcd MyFirstProgram
Next page
Light

Font size:

Reset

Interval:

Bookmark:

Make

Similar books «C# 9.0 Pocket Reference: Instant Help for C# 9.0 Programmers»

Look at similar books to C# 9.0 Pocket Reference: Instant Help for C# 9.0 Programmers. We have selected literature similar in name and meaning in the hope of providing readers with more options to find new, interesting, not yet read works.


Reviews about «C# 9.0 Pocket Reference: Instant Help for C# 9.0 Programmers»

Discussion, reviews of the book C# 9.0 Pocket Reference: Instant Help for C# 9.0 Programmers and just readers' own opinions. Leave your comments, write what you think about the work, its meaning or the main characters. Specify what exactly you liked and what you didn't like, and why you think so.