C# guides
Every published C# guide, newest first, with practical examples you can copy into your own project.
3,965 guides across 14 topics
Topics
Popular C# guides
Most readLatest C# guides
Page 13 of 77C# Anonymous Type with LINQ: Projection and Usage
Learn how C# anonymous types work with LINQ for projections, grouping, joins, and composite keys, and when a named DTO is the better choice.
C# Anonymous Type: Syntax, Usage, and Limitations
c# anonymous type: Learn how to use C# anonymous types for read-only data projections, their syntax, runtime behavior, and when to prefer tuples or records.
C# Dynamic Runtime Binding Explained with Examples
C# dynamic runtime binding defers member resolution until runtime. Understand how the dynamic keyword works with the DLR, when RuntimeBinderException appears, and the performance trade-offs to expect.
C# Dynamic Method Invocation at Runtime
Learn how to call C# methods by name at runtime using reflection, the dynamic keyword, and cached delegates, with practical performance and maintainability tradeoffs.
C# Dynamic vs Var: Type Safety and Runtime Behavior
C# dynamic vs var: Understand the real differences between compile-time type inference and runtime binding, including performance costs, error handling, and when to choose each.
c# dynamic vs object: Choosing the Right Type
c# dynamic vs object: Compare C# dynamic and object types: runtime behavior, performance implications, and when to use each for maintainable code.
Using the C# Dynamic Keyword Safely
c# dynamic keyword: Learn when and how to use the `dynamic` keyword in C# for runtime binding, interoperability, and reflection scenarios, including performance and sa...
Detecting Generic Types with C# Reflection
Learn how to detect generic types with C# reflection: inspect type properties, read generic arguments and definitions, and resolve generic interfaces and base classes.
C# Activator.CreateInstance: Runtime Object Creation
Learn how to use C# Activator.CreateInstance to create objects at runtime, pass constructor arguments, handle exceptions, and evaluate performance tradeoffs.
C# Reflection: Get Properties at Runtime
Use Type.GetProperties() to inspect and manipulate C# properties at runtime: retrieve PropertyInfo metadata, filter with BindingFlags, read and write values, and avoid common reflection pitfalls.