Saltar al contenido ForoHackers

C# and .NET: start here

C# y .NET
#561 · Ophuscado · · Denunciar

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

Inicia sesión o únete para responder.