Skip to the content ForoHackers
Log inJoin

C# and .NET: start here

C# and .NET
#3067 · · Quote · Report

C# is a statically typed, object-oriented language with strong functional features, and .NET is the platform it runs on: a runtime, a large class library and tools. Together they build web services, desktop and mobile apps, games and command-line tools on Windows, Linux and macOS. Other languages, such as F#, share the same runtime.

Key concepts

  • Managed runtime: code compiles to an intermediate language that the runtime compiles to machine code and manages, with garbage collection.
  • Types: classes, structs, interfaces, records, generics and nullable reference types.
  • LINQ: queries over collections written in the language, in a functional style.
  • Async and await: asynchronous code that reads like sequential code.
  • Base class library: collections, files, networking, text and dependency injection ready to use.
  • Packages and projects: a project file, a package manager and a command-line tool drive builds.

Vocabulary

  • CLR: the common language runtime that executes .NET code.
  • Assembly: the unit of compiled code and metadata, a dll or an executable.
  • Delegate: a typed reference to a method, the base of events and lambdas.
  • Dependency injection: passing a component its collaborators instead of creating them inside.

What to study, in order

  1. Syntax, types, control flow and the command-line tool for creating and running a console app.
  2. Classes, interfaces, generics and collections; model a small domain.
  3. LINQ and lambdas to query and transform data.
  4. Async and await with files and HTTP requests.
  5. A web API or desktop app with tests and dependency injection.
  6. Read about the garbage collector and about value types to avoid needless allocations.

Related tags

#java #windows #backend #design-patterns

You are not logged in, so this goes up anonymously: no account, no name and no address is stored with it, and it may carry no link and no image. Log in or join to post under your name. Our web server's logs keep the address and time of every request for up to 14 days; to keep yours out of them, use Tor. To reach the staff in confidence, use the drop. Sign as a returning source (a key kept only in this browser)

Sending takes a few seconds here: your browser first works out a proof of work against spam.

Reply