Descripción
Guía condensada y práctica que reúne lo esencial del lenguaje C#, diseñada para programadores y desarrolladores que buscan un recurso rápido de consulta y aprendizaje. Organizada en secciones temáticas independientes, cada fragmento aborda desde conceptos elementalescomo tipos de datos, estructuras de control y funcioneshasta herramientas más avanzadas como programación orientada a objetos, LINQ, asincronía con async/await, manejo de excepciones y acceso a datos. GoalKicker, autor colaborativo, prioriza la claridad y la funcionalidad: cada sección incluye explicaciones breves, ejemplos de código completos y comentarios que ilustran su aplicación real.
Estructura pensada para ser utilizada como referencia en el trabajo diario, repaso previo a entrevistas técnicas o complementario en cursos formales de programación en .NET. Indice rico en patrones comunes, trucos útiles y buenas prácticas, lo que permite al lector adoptar rápidamente soluciones eficientes y evitar errores frecuentes. Ideal para desarrolladores con conocimientos previos que buscan mejorar su fluidez en C#, así como para estudiantes de informática que requieren una guía confiable y bien estructurada sin perder tiempo en documentación extensa. Más que un manual didáctico, representa una herramienta funcional que potencia la productividad, agiliza la resolución de dudas y facilita el dominio del lenguaje en proyectos reales, reforzando la escritura de código limpio, legible y alineado con las convenciones del ecosistema .NET.
Chapter 1: Getting started with C# Language
Section 1.1: Creating a new console application (Visual Studio)
Section 1.2: Creating a new project in Visual Studio (console application) and Running it in Debug mode
Section 1.3: Creating a new program using .NET Core
Section 1.4: Creating a new program using Mono
Section 1.5: Creating a new query using LinqPad
Section 1.6: Creating a new project using Xamarin Studio
Chapter 2: Literals
Section 2.1: uint literals
Section 2.2: int literals
Section 2.3: sbyte literals
Section 2.4: decimal literals
Section 2.5: double literals
Section 2.6: float literals
Section 2.7: long literals
Section 2.8: ulong literal
Section 2.9: string literals
Section 2.10: char literals
Section 2.11: byte literals
Section 2.12: short literal
Section 2.13: ushort literal
Section 2.14: bool literals
Chapter 3: Operators
Section 3.1: Overloadable Operators
Section 3.2: Overloading equality operators
Section 3.3: Relational Operators
Section 3.4: Implicit Cast and Explicit Cast Operators
Section 3.5: Short-circuiting Operators
Section 3.6: ? : Ternary Operator
Section 3.7: ?. (Null Conditional Operator)
Section 3.8: "Exclusive or" Operator
Section 3.9: default Operator
Section 3.10: Assignment operator '='
Section 3.11: sizeof
Section 3.12: ?? Null-Coalescing Operator
Section 3.13: Bit-Shifting Operators
Section 3.14: => Lambda operator
Section 3.15: Class Member Operators: Null Conditional Member Access
Section 3.16: Class Member Operators: Null Conditional Indexing
Section 3.17: Postfix and Prefix increment and decrement
Section 3.18: typeof
Section 3.19: Binary operators with assignment
Section 3.20: nameof Operator
Section 3.21: Class Member Operators: Member Access
Section 3.22: Class Member Operators: Function Invocation
Section 3.23: Class Member Operators: Aggregate Object Indexing
Chapter 4: Conditional Statements
Section 4.1: If-Else Statement
Section 4.2: If statement conditions are standard boolean expressions and values
Section 4.3: If-Else If-Else Statement
Chapter 5: Equality Operator
Section 5.1: Equality kinds in C# and equality operator
Chapter 6: Equals and GetHashCode
Section 6.1: Writing a good GetHashCode override
Section 6.2: Default Equals behavior
Section 6.3: Override Equals and GetHashCode on custom types
Section 6.4: Equals and GetHashCode in IEqualityComparator
Chapter 7: Null-Coalescing Operator
Section 7.1: Basic usage
Section 7.2: Null fall-through and chaining
Section 7.3: Null coalescing operator with method calls
Section 7.4: Use existing or create new
Section 7.5: Lazy properties initialization with null coalescing operator
Chapter 8: Null-conditional Operators
Section 8.1: Null-Conditional Operator
Section 8.2: The Null-Conditional Index
Section 8.3: Avoiding NullReferenceExceptions
Section 8.4: Null-conditional Operator can be used with Extension Method
Chapter 9: nameof Operator
Section 9.1: Basic usage: Printing a variable name
Section 9.2: Raising PropertyChanged event
Section 9.3: Argument Checking and Guard Clauses
Section 9.4: Strongly typed MVC action links
Section 9.5: Handling PropertyChanged events
Section 9.6: Applied to a generic type parameter
Section 9.7: Printing a parameter name
Section 9.8: Applied to qualified identifiers
Chapter 10: Verbatim Strings
Section 10.1: Interpolated Verbatim Strings
Section 10.2: Escaping Double Quotes
Section 10.3: Verbatim strings instruct the compiler to not use character escapes
Section 10.4: Multiline Strings
Chapter 11: Common String Operations
Section 11.1: Formatting a string
Section 11.2: Correctly reversing a string
Section 11.3: Padding a string to a fixed length
Section 11.4: Getting x characters from the right side of a string
Section 11.5: Checking for empty String using String.IsNullOrEmpty() and String.IsNullOrWhiteSpace()
Section 11.6: Trimming Unwanted Characters Off the Start and/or End of Strings
Section 11.7: Convert Decimal Number to Binary, Octal and Hexadecimal Format
Section 11.8: Construct a string from Array
Section 11.9: Formatting using ToString
Section 11.10: Splitting a String by another string
Section 11.11: Splitting a String by specific character
Section 11.12: Getting Substrings of a given string
Section 11.13: Determine whether a string begins with a given sequence
Section 11.14: Getting a char at specific index and enumerating the string
Section 11.15: Joining an array of strings into a new one
Section 11.16: Replacing a string within a string
Section 11.17: Changing the case of characters within a String
Section 11.18: Concatenate an array of strings into a single string
Section 11.19: String Concatenation
Chapter 12: String.Format
Section 12.1: Since C# 6.0
Section 12.2: Places where String.Format is 'embedded' in the framework
Section 12.3: Create a custom format provider
Section 12.4: Date Formatting
Section 12.5: Currency Formatting
Section 12.6: Using custom number format
Section 12.7: Align left/ right, pad with spaces
Section 12.8: Numeric formats
Section 12.9: ToString()
Section 12.10: Escaping curly brackets inside a String.Format() expression
Section 12.11: Relationship with ToString()
Chapter 13: String Concatenate
Section 13.1: + Operator
Section 13.2: Concatenate strings using System.Text.StringBuilder
Section 13.3: Concat string array elements using String.Join
Section 13.4: Concatenation of two strings using $
Chapter 14: String Manipulation
Section 14.1: Replacing a string within a string
Section 14.2: Finding a string within a string
Section 14.3: Removing (Trimming) white-space from a string
Section 14.4: Splitting a string using a delimiter
Section 14.5: Concatenate an array of strings into a single string
Section 14.6: String Concatenation
Section 14.7: Changing the case of characters within a String
Chapter 15: String Interpolation
Section 15.1: Format dates in strings
Section 15.2: Padding the output
Section 15.3: Expressions
Section 15.4: Formatting numbers in strings
Section 15.5: Simple Usage
Chapter 16: String Escape Sequences
Section 16.1: Escaping special symbols in string literals
Section 16.2: Unicode character escape sequences
Section 16.3: Escaping special symbols in character literals
Section 16.4: Using escape sequences in identifiers
Section 16.5: Unrecognized escape sequences produce compile-time errors
Chapter 17: StringBuilder
Section 17.1: What a StringBuilder is and when to use one
Section 17.2: Use StringBuilder to create string from a large number of records
Chapter 18: Regex Parsing
Section 18.1: Single match
Section 18.2: Multiple matches
Chapter 19: DateTime Methods
Section 19.1: DateTime Formatting
Section 19.2: DateTime.AddDays(Double)
Section 19.3: DateTime.AddHours(Double)
Section 19.4: DateTime.Parse(String)
Section 19.5: DateTime.TryParse(String, DateTime)
Section 19.6: DateTime.AddMilliseconds(Double)
Section 19.7: DateTime.Compare(DateTime t1, DateTime t2)
Section 19.8: DateTime.DaysInMonth(Int32, Int32)
Section 19.9: DateTime.AddYears(Int32)
Section 19.10: Pure functions warning when dealing with DateTime
Section 19.11: DateTime.TryParseExact(String, String, IFormatProvider, DateTimeStyles, DateTime)
Section 19.12: DateTime.Add(TimeSpan)
Section 19.13: Parse and TryParse with culture info
Section 19.14: DateTime as initializer in for-loop
Section 19.15: DateTime.ParseExact(String, String, IFormatProvider)
Section 19.16: DateTime ToString, ToShortDateString, ToLongDateString and ToString formatted
Section 19.17: Current Date
Chapter 20: Arrays
Section 20.1: Declaring an array
Section 20.2: Initializing an array filled with a repeated non-default value
Section 20.3: Copying arrays
Section 20.4: Comparing arrays for equality
Section 20.5: Multi-dimensional arrays
Section 20.6: Getting and setting array values
Section 20.7: Iterate over an array
Section 20.8: Creating an array of sequential numbers
Section 20.9: Jagged arrays
Section 20.10: Array covariance
Section 20.11: Arrays as IEnumerable instances
Section 20.12: Checking if one array contains another array
Chapter 21: O(n) Algorithm for circular rotation of an array
Section 21.1: Example of a generic method that rotates an array by a given shift
Chapter 22: Enum
Section 22.1: Enum basics
Section 22.2: Enum as flags
Section 22.3: Using << notation for flags
Section 22.4: Test flags-style enum values with bitwise logic
Section 22.5: Add and remove values from flagged enum
Section 22.6: Enum to string and back
Section 22.7: Enums can have unexpected values
Section 22.8: Default value for enum == ZERO
Section 22.9: Adding additional description information to an enum value
Section 22.10: Get all the members values of an enum
Section 22.11: Bitwise Manipulation using enums
Chapter 23: Tuples
Section 23.1: Accessing tuple elements
Section 23.2: Creating tuples
Section 23.3: Comparing and sorting Tuples
Section 23.4: Return multiple values from a method
Chapter 24: Guid
Section 24.1: Getting the string representation of a Guid
Section 24.2: Creating a Guid
Section 24.3: Declaring a nullable GUID
Chapter 25: BigInteger
Section 25.1: Calculate the First 1,000-Digit Fibonacci Number
Chapter 26: Collection Initializers
Section 26.1: Collection initializers
Section 26.2: C# 6 Index Initializers
Section 26.3: Collection initializers in custom classes
Section 26.4: Using collection initializer inside object initializer
Section 26.5: Collection Initializers with Parameter Arrays
Chapter 27: An overview of C# collections
Section 27.1: HashSet
Section 27.2: Dictionary
Section 27.3: SortedSet
Section 27.4: T[ ] (Array of T)
Section 27.5: List
Section 27.6: Stack
Section 27.7: LinkedList
Section 27.8: Queue
Chapter 28: Looping
Section 28.1: For Loop
Section 28.2: Do - While Loop
Section 28.3: Foreach Loop
Section 28.4: Looping styles
Section 28.5: Nested loops
Section 28.6: continue
Section 28.7: While loop
Section 28.8: break
Chapter 29: Iterators
Section 29.1: Creating Iterators Using Yield
Section 29.2: Simple Numeric Iterator Example
Chapter 30: IEnumerable
Section 30.1: IEnumerable with custom Enumerator
Section 30.2: IEnumerable
Chapter 31: Value type vs Reference type
Section 31.1: Passing by reference using ref keyword
Section 31.2: Changing values elsewhere
Section 31.3: ref vs out parameters
Section 31.4: Assignment
Section 31.5: Difference with method parameters ref and out
Section 31.6: Passing by reference
Chapter 32: Built-in Types
Section 32.1: Conversion of boxed value types
Section 32.2: Comparisons with boxed value types
Section 32.3: Immutable reference type - string
Section 32.4: Value type - char
Section 32.5: Value type - short, int, long (signed 16 bit, 32 bit, 64 bit integers)
Section 32.6: Value type - ushort, uint, ulong (unsigned 16 bit, 32 bit, 64 bit integers)
Section 32.7: Value type - bool
Chapter 33: Aliases of built-in types
Section 33.1: Built-In Types Table
Chapter 34: Anonymous types
Section 34.1: Anonymous vs dynamic
Section 34.2: Creating an anonymous type
Section 34.3: Anonymous type equality
Section 34.4: Generic methods with anonymous types
Section 34.5: Instantiating generic types with anonymous types
Section 34.6: Implicitly typed arrays
Chapter 35: Dynamic type
Section 35.1: Creating a dynamic object with properties
Section 35.2: Creating a dynamic variable
Section 35.3: Returning dynamic
Section 35.4: Handling Specific Types Unknown at Compile Time
Chapter 36: Type Conversion
Section 36.1: Explicit Type Conversion
Section 36.2: MSDN implicit operator example
Chapter 37: Casting
Section 37.1: Checking compatibility without casting
Section 37.2: Cast an object to a base type
Section 37.3: Conversion Operators
Section 37.4: LINQ Casting operations
Section 37.5: Explicit Casting
Section 37.6: Safe Explicit Casting (as operator)
Section 37.7: Implicit Casting
Section 37.8: Explicit Numeric Conversions
Chapter 38: Nullable types
Section 38.1: Initialising a nullable
Section 38.2: Check if a Nullable has a value
Section 38.3: Get the value of a nullable type
Section 38.4: Getting a default value from a nullable
Section 38.5: Default value of nullable types is null
Section 38.6: Effective usage of underlying Nullable argument
Section 38.7: Check if a generic type parameter is a nullable type
Chapter 39: Constructors and Finalizers
Section 39.1: Static constructor
Section 39.2: Singleton constructor pattern
Section 39.3: Default Constructor
Section 39.4: Forcing a static constructor to be called
Section 39.5: Calling a constructor from another constructor
Section 39.6: Calling the base class constructor
Section 39.7: Finalizers on derived classes
Section 39.8: Exceptions in static constructors
Section 39.9: Constructor and Property Initialization
Section 39.10: Generic Static Constructors
Section 39.11: Calling virtual methods in constructor
Chapter 40: Access Modifiers
Section 40.1: Access Modifiers Diagrams
Section 40.2: public
Section 40.3: private
Section 40.4: protected internal
Section 40.5: internal
Section 40.6: protected
Chapter 41: Interfaces
Section 41.1: Implementing an interface
Section 41.2: Explicit interface implementation
Section 41.3: Interface Basics
Section 41.4: IComparable as an Example of Implementing an Interface
Section 41.5: Implementing multiple interfaces
Section 41.6: Why we use interfaces
Section 41.7: "Hiding" members with Explicit Implementation
Chapter 42: Static Classes
Section 42.1: Static Classes
Section 42.2: Static class lifetime
Section 42.3: Static keyword
Chapter 43: Singleton Implementation
Section 43.1: Statically Initialized Singleton
Section 43.2: Lazy, thread-safe Singleton (using Lazy)
Section 43.3: Lazy, thread-safe Singleton (using Double Checked Locking)
Section 43.4: Lazy, thread-safe singleton (for .NET 3.5 or older, alternate implementation)
Chapter 44: Dependency Injection
Section 44.1: Dependency Injection C# and ASP.NET with Unity
Section 44.2: Dependency injection using MEF
Chapter 45: Partial class and methods
Section 45.1: Partial classes
Section 45.2: Partial classes inheriting from a base class
Section 45.3: Partial methods
Chapter 46: Object initializers
Section 46.1: Simple usage
Section 46.2: Usage with non-default constructors
Section 46.3: Usage with anonymous types
Chapter 47: Methods
Section 47.1: Calling a Method
Section 47.2: Anonymous method
Section 47.3: Declaring a Method
Section 47.4: Parameters and Arguments
Section 47.5: Return Types
Section 47.6: Default Parameters
Section 47.7: Method overloading
Section 47.8: Access rights
Chapter 48: Extension Methods
Section 48.1: Extension methods - overview
Section 48.2: Null checking
Section 48.3: Explicitly using an extension method
Section 48.4: Generic Extension Methods
Section 48.5: Extension methods can only see public (or internal) members of the extended class
Section 48.6: Extension methods for chaining
Section 48.7: Extension methods with Enumeration
Section 48.8: Extension methods dispatch based on static type
Section 48.9: Extension methods on Interfaces
Section 48.10: Extension methods in combination with interfaces
Section 48.11: Extension methods aren't supported by dynamic code
Section 48.12: Extensions and interfaces together enable DRY code and mixin-like functionality
Section 48.13: IList Extension Method Example: Comparing 2 Lists
Section 48.14: Extension methods as strongly typed wrappers
Section 48.15: Using Extension methods to create beautiful mapper classes
Section 48.16: Using Extension methods to build new collection types (e.g. DictList)
Section 48.17: Extension methods for handling special cases
Section 48.18: Using Extension methods with Static methods and Callbacks
Chapter 49: Named Arguments
Section 49.1: Argument order is not necessary
Section 49.2: Named arguments and optional parameters
Section 49.3: Named Arguments can make your code more clear
Chapter 50: Named and Optional Arguments
Section 50.1: Optional Arguments
Section 50.2: Named Arguments
Chapter 51: Data Annotation
Section 51.1: Data Annotation Basics
Section 51.2: Creating a custom validation attribute
Section 51.3: Manually Execute Validation Attributes
Section 51.4: Validation Attributes
Section 51.5: EditableAttribute (data modeling attribute)
Chapter 52: Keywords
(Contiene más de 60 secciones, omito el listado completo aquí por brevedad, pero si lo deseas puedo enviártelo en bloque aparte.)
Chapter 53: Object Oriented Programming In C#
Section 53.1: Classes
Chapter 54: Recursion
Section 54.1: Recursion in plain English
Section 54.2: Fibonacci Sequence
Section 54.3: PowerOf calculation
Section 54.4: Recursively describe an object structure
Section 54.5: Using Recursion to Get Directory Tree
Section 54.6: Factorial calculation
Chapter 55: Naming Conventions
Section 55.1: Capitalization conventions
Section 55.2: Enums
Section 55.3: Interfaces
Section 55.4: Exceptions
Section 55.5: Private fields
Section 55.6: Namespaces
Chapter 56: XML Documentation Comments
Section 56.1: Simple method annotation
Section 56.2: Generating XML from documentation comments
Section 56.3: Method documentation comment with param and returns elements
Section 56.4: Interface and class documentation comments
Section 56.5: Referencing another class in documentation
Chapter 57: Comments and regions
Section 57.1: Comments
Section 57.2: Regions
Section 57.3: Documentation comments
Chapter 58: Inheritance
Section 58.1: Inheritance. Constructors' calls sequence
Section 58.2: Inheriting from a base class
Section 58.3: Inheriting from a class and implementing an interface
Section 58.4: Inheriting from a class and implementing multiple interfaces
Section 58.5: Constructors In A Subclass
Section 58.6: Inheritance Anti-patterns
Section 58.7: Extending an abstract base class
Section 58.8: Testing and navigating inheritance
Section 58.9: Inheriting methods
Section 58.10: Base class with recursive type specification
Chapter 59: Generics
Section 59.1: Implicit type inference (methods)
Section 59.2: Type inference (classes)
Section 59.3: Using generic method with an interface as a constraint type
Section 59.4: Type constraints (new-keyword)
Section 59.5: Type constraints (classes and interfaces)
Section 59.6: Checking equality of generic values
Section 59.7: Reflecting on type parameters
Section 59.8: Covariance
Section 59.9: Contravariance
Section 59.10: Invariance
Section 59.11: Variant interfaces
Section 59.12: Variant delegates
Section 59.13: Variant types as parameters and return values
Section 59.14: Type Parameters (Interfaces)
Section 59.15: Type constraints (class and struct)
Section 59.16: Explicit type parameters
Section 59.17: Type Parameters (Classes)
Section 59.18: Type Parameters (Methods)
Section 59.19: Generic type casting
Section 59.20: Configuration reader with generic type casting
Chapter 60: Using Statement
Section 60.1: Using Statement Basics
Section 60.2: Gotcha: returning the resource which you are disposing
Section 60.3: Multiple using statements with one block
Section 60.4: Gotcha: Exception in Dispose method masking other errors in Using blocks
Section 60.5: Using statements are null-safe
Section 60.6: Using Dispose Syntax to define custom scope
Section 60.7: Using Statements and Database Connections
Section 60.8: Executing code in constraint context
Chapter 61: Using Directive
Section 61.1: Associate an Alias to Resolve Conflicts
Section 61.2: Using alias directives
Section 61.3: Access Static Members of a Class
Section 61.4: Basic Usage
Section 61.5: Reference a Namespace
Section 61.6: Associate an Alias with a Namespace
Chapter 62: IDisposable interface
Section 62.1: In a class that contains only managed resources
Section 62.2: In a class with managed and unmanaged resources
Section 62.3: IDisposable, Dispose
Section 62.4: using keyword
Section 62.5: In an inherited class with managed resources
Chapter 63: Reflection
Section 63.1: Get the members of a type
Section 63.2: Get a method and invoke it
Section 63.3: Creating an instance of a Type
Section 63.4: Get a Strongly-Typed Delegate to a Method or Property via Reflection
Section 63.5: Get a generic method and invoke it
Section 63.6: Get a System.Type
Section 63.7: Getting and setting properties
Section 63.8: Create an instance of a Generic Type and invoke its method
Section 63.9: Custom Attributes
Section 63.10: Instantiating classes that implement an interface (e.g. plugin activation)
Section 63.11: Get a Type by name with namespace
Section 63.12: Determining generic arguments of instances of generic types
Section 63.13: Looping through all the properties of a class
Chapter 64: IQueryable interface
Section 64.1: Translating a LINQ query to a SQL query
Chapter 65: Linq to Objects
Section 65.1: Using LINQ to Objects in C#
Chapter 66: LINQ Queries
(Contiene más de 40 secciones. ¿Deseas que las liste también?)
Chapter 67: LINQ to XML
Section 67.1: Read XML using LINQ to XML
Chapter 68: Parallel LINQ (PLINQ)
Section 68.1: Simple example
Section 68.2: WithDegreeOfParallelism
Section 68.3: AsOrdered
Section 68.4: AsUnordered
Chapter 69: XmlDocument and the System.Xml namespace
Section 69.1: XmlDocument vs XDocument (Example and comparison)
Section 69.2: Reading from XML document
Section 69.3: Basic XML document interaction
Capítulo 70: XDocument and the System.Xml.Linq namespace
Generar un documento XML
Generar un documento XML con sintaxis fluida
Modificar archivo XML
Capítulo 71: C# 7.0 Features
Language support for Tuples
Local functions
out var declaration
Pattern Matching
Digit separators
Binary literals
throw expressions
Extended expression-bodied members list
ref return y ref local
ValueTask
Capítulo 72: C# 6.0 Features
Exception filters
String interpolation
Auto-property initializers
Null propagation
Expression-bodied function members
Operador nameof
Using static type
Index initializers
Improved overload resolution
await en catch y finally
Cambios menores y correcciones
Collection initialization con método de extensión
Deshabilitar advertencias (enhancements)
Capítulo 73: C# 5.0 Features
Async & Await
Caller Information Attributes
Capítulo 74: C# 4.0 Features
Parámetros opcionales y argumentos nombrados
Variance
Dynamic member lookup
ref opcional al usar COM
Capítulo 75: C# 3.0 Features
Variables implícitas (var)
LINQ
Expresiones lambda
Tipos anónimos
Capítulo 76: Exception Handling
Creación de excepciones personalizadas
Bloque finally
Buenas prácticas
Anti-patrones de excepciones
Manejo básico de excepciones
Manejar tipos de excepción específicos
Excepciones agregadas / múltiples
Lanzar una excepción
Excepciones no controladas e hilos
Implementar IErrorHandler en WCF
Uso del objeto excepción
Anidado de excepciones y bloques try-catch
Capítulo 77: NullReferenceException
Explicación de NullReferenceException
Capítulo 78: Handling FormatException when converting string to other types
Convertir string a entero
Capítulo 79: Read & Understand Stacktraces
Rastreo de pila para un NullReferenceException en Windows Forms
Capítulo 80: Diagnostics
Redirigir salida de registro con TraceListeners
Debug.WriteLine
Capítulo 81: Overflow
Desbordamiento de enteros
Desbordamiento durante operaciones
El orden importa
Capítulo 82: Getting Started: Json with C#
Ejemplo Json simple
Biblioteca para trabajar con Json
Implementación en C#
Serialización
Deserialización
Utilidades comunes de serialización / deserialización
Capítulo 83: Using json.net
JsonConverter en valores simples
Obtener todos los campos de un objeto JSON
Capítulo 84: Lambda Expressions
Expresiones lambda como abreviatura de inicialización de delegados
Lambda como manejador de eventos
Lambda con múltiples o sin parámetros
Func y Expression
Bloque de instrucciones en lambda
Lambdas para Func y Action
Crear closures con sintaxis lambda
Pasar una lambda como parámetro
Uso básico de lambdas
Lambdas con LINQ
Lambda con cuerpo de bloque
Lambdas con System.Linq.Expressions
Capítulo 85: Generic Lambda Query Builder
Clase QueryFilter
Método GetExpression
Sobrecarga privada de GetExpression
Método ConstantExpression
Uso
Capítulo 86: Properties
Propiedades auto-implementadas
Valores por defecto
get público
set público
Acceso a propiedades
Propiedades de solo lectura
Varias propiedades en contexto
Capítulo 87: Initializing Properties
C# 6: inicializar propiedad auto-implementada
Inicializar propiedad con campo de respaldo
Inicializar durante la instanciación
Inicializar en el constructor
Capítulo 88: INotifyPropertyChanged interface
Implementación en C# 6
Implementación con método genérico Set
Capítulo 89: Events
Declarar y disparar eventos
Propiedades de eventos
Eventos cancelables
Declaración estándar de eventos
Manejador anónimo
Declaración no estándar
EventArgs personalizados
Capítulo 90: Expression Trees
Crear árboles de expresión con lambda
Crear árboles mediante API
Compilar árboles de expresión
Parseo de árboles de expresión
Conceptos básicos
Visitor para examinar la estructura
API de expresiones
Capítulo 91: Overload Resolution
Ejemplo básico
Expansión de params solo si es necesaria
Pasar null como argumento
Capítulo 92: BindingList
Agregar ítems a la lista
Evitar iteración N*2
Capítulo 93: Preprocessor Directives
Expresiones condicionales
Otras instrucciones del compilador
Definir y anular símbolos
Bloques region
Deshabilitar y restaurar advertencias
Generar advertencias y errores
Preprocesadores personalizados a nivel de proyecto
Usar el atributo Conditional
Capítulo 94: Structs
Declarar un struct
Uso de structs
Copia al asignar
Struct implementando interfaz
Capítulo 95: Attributes
Crear un atributo personalizado
Leer un atributo
Usar un atributo
DebuggerDisplay
Atributos de información de llamada
Atributo Obsolete
Leer atributo desde interfaz
Capítulo 96: Delegates
Declarar un tipo delegado
Delegados Func, Action y Predicate
Delegados multicast
Invocación segura
Igualdad de delegados
Referencias subyacentes
Asignación de métodos nombrados y lambdas
Closures en delegados
Capítulo 97: File and Stream I/O
Leer archivo con System.IO.File
Lectura diferida línea a línea
Escritura asíncrona con StreamWriter
Copiar archivo
Escribir líneas con StreamWriter
Crear, mover, borrar archivos
Archivos y directorios
Capítulo 98: Networking
Cliente TCP básico
Descargar archivo de servidor web
Cliente TCP asíncrono
Cliente UDP básico
Capítulo 99: Performing HTTP requests
Crear y enviar petición HTTP POST
Crear y enviar petición HTTP GET
Manejo de códigos de respuesta específicos
Obtener HTML de página web
HTTP POST asíncrono con cuerpo JSON
Capítulo 100: Reading and writing .zip files
Escribir en archivo zip
Escribir zip en memoria
Obtener archivos de un zip
Extraer archivos .txt de un zip
Capítulo 101: FileSystemWatcher
IsFileReady
FileWatcher básico
Capítulo 102: Access network shared folder with username and password
Código para acceder a recurso compartido
Capítulo 103: Asynchronous Socket
Ejemplo de socket asíncrono (cliente / servidor)
Capítulo 104: Action Filters
Filtros de acción personalizados
Capítulo 105: Polymorphism
Tipos de polimorfismo
Otro ejemplo de polimorfismo
Capítulo 106: Immutability
Clase System.String
Cadenas e inmutabilidad
Capítulo 107: Indexer
Indexador simple
Indexador sobrecargado (SparseArray)
Indexador con 2 argumentos e interfaz
Capítulo 108: Checked and Unchecked
Uso de checked y unchecked
Alcance de checked / unchecked
Capítulo 109: Stream
Uso de Streams
Capítulo 110: Timers
Timers multihilo
Crear instancia de Timer
Asignar evento Tick
Cuenta regresiva con Timer
Capítulo 111: Stopwatches
IsHighResolution
Crear instancia de Stopwatch
Capítulo 112: Threading
Evitar acceso simultáneo a datos
Crear y arrancar segundo hilo
Parallel.ForEach
Deadlocks (retener recurso y esperar)
Demo completa de threading
Un hilo por procesador
Demo con Tasks
Deadlocks de espera mutua
Paralelismo explícito e implícito
Hilo con parámetros
Capítulo 113: Async/await, Backgroundworker, Task and Thread Examples
113.1: ASP.NET Configure Await
113.2: Task "run and forget" extension
113.3: Async/await
113.4: BackgroundWorker
113.5: Task
113.6: Thread
Capítulo 114: Async-Await
114.1: Await operator and async keyword
114.2: Concurrent calls
114.3: Try/Catch/Finally
114.4: Returning a Task without await
114.5: Performance considerations of async/await
114.6: Web.config setup for async behavior
114.7: Simple consecutive calls
114.8: Deadlocks from blocking async code
Capítulo 115: Synchronization Context in Async-Await
115.1: Pseudocode for async/await keywords
115.2: Disabling synchronization context
115.3: Importance of SynchronizationContext
Capítulo 116: BackgroundWorker
116.1: Completing a task with BackgroundWorker
116.2: Assigning event handlers
116.3: Creating instances
116.4: Setting properties
Capítulo 117: Task Parallel Library
117.1: Parallel.ForEach
117.2: Parallel.For
117.3: Parallel.Invoke
Capítulo 118: Making a variable thread safe
118.1: Access control in Parallel.For loop
Capítulo 119: Lock Statement
119.1: Throwing exception inside lock
119.2: Basic usage
119.3: Return inside lock
119.4: Anti-patterns
119.5: Using Object instances for locking
Capítulo 120: Yield Keyword
120.1: Basic usage
120.2: Argument validation
120.3: Early termination
120.4: Practical applications
120.5: Lazy evaluation
120.6: Try...finally
120.7: Eager evaluation
120.8: Creating IEnumerator
120.9: Fibonacci example
120.10: break vs yield break
120.11: Returning nested Enumerable
Capítulo 121: Task Parallel Library (TPL) Dataflow Constructs
ActionBlock
BroadcastBlock
BufferBlock
JoinBlock
WriteOnceBlock
BatchedJoinBlock
TransformBlock
TransformManyBlock
BatchBlock
Capítulo 122: Functional Programming
Func and Action
Higher-Order Functions
Avoid Null References
Immutability
Immutable collections
Capítulo 123: Func delegates
Without parameters
With multiple variables
Lambda & anonymous methods
Covariant & Contravariant Type Parameters
Capítulo 124: Function with multiple return values
"anonymous object" + "dynamic keyword" solution
Tuple solution
Ref and Out Parameters
Capítulo 125: Binary Serialization
Controlling serialization behavior with attributes
Serialization Binder
Backward compatibility gotchas
Making an object serializable
Serialization surrogates
Implementing ISerializable
Capítulo 126: ICloneable
Implementing ICloneable in a class
Implementing ICloneable in a struct
Capítulo 127: IComparable
Sort versions
Capítulo 128: Accessing Databases
Connection Strings
Entity Framework Connections
ADO.NET Connections
Capítulo 129: Using SQLite in C#
Creating simple CRUD using SQLite
Executing Query
Capítulo 130: Caching
MemoryCache
Capítulo 131: Code Contracts
Postconditions
Invariants
Contracts on Interface
Preconditions
Capítulo 132: Code Contracts and Assertions
Assertions to check logic should always be true
Capítulo 133: Structural Design Patterns
Adapter Design Pattern
Capítulo 134: Creational Design Patterns
Singleton Pattern
Factory Method pattern
Abstract Factory Pattern
Builder Pattern
Prototype Pattern
Capítulo 135: Implementing Decorator Design Pattern
Simulating cafeteria
Capítulo 136: Implementing Flyweight Design Pattern
Implementing map in RPG game
Capítulo 137: System.Management.Automation
Invoke simple synchronous pipeline
Capítulo 138: System.DirectoryServices.Protocols.Ldap
Consulta los datos bibliográficos de esta edición para identificar correctamente el recurso, revisar su autoría y verificar detalles como ISBN, tema, subtema, archivo e idioma.
- Título: C Sharp Notes for Professionals
- Autor/es: GoalKicker
- Edición: 1ra Edición
- Año de publicación: 2018
- Tipo de archivo: eBook
- Idioma: eBook en Inglés
- Subtema: Programación en C
Citar este libro
Preparando citaciones...
Aún no hay comentarios
Sé el primero en compartir tu opinión sobre este contenido.
Escribir un comentario