This web site uses cookies. By using the site you accept the cookie policy.This message is for compliance with the UK ICO law.

<< Previous | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | Next >> |
C# Volatile FieldsC# Volatile Fields
Optimisation techniques used when compiling or running software that uses the .NET framework can lead to unexpected results. One situation that causes problems is performing non-volatile reads of fields in multithreading or parallel programming scenarios.
C# Defining Preprocessor SymbolsC# Defining Preprocessor Symbols
In C#, preprocessor symbols can be defined or undefined in code or during compilation. With the use of the #if preprocessor directive, they determine which parts of the code are compiled and which are excluded from the final assemblies.
C# Conditional Preprocessor DirectivesC# Conditional Preprocessor Directives
The C# Preprocessor directives allow the code of a project to be changed at compile time depending upon whether symbols have, or have not, been defined. This article describes the use of the conditional preprocessor directives.
C# Interface EventsC# Interface Events
An interface can be created to define a contract containing members that classes that implement it must provide. Interfaces can define events, sometimes leading to classes that implement several interfaces being required to declare an event name twice.
C# Dynamic TypeC# Dynamic Type
It is common for C# applications to interoperate with other languages and frameworks, including dynamic languages such as Python or Ruby. As the typing systems are fundamentally different, C# 4.0 introduces the dynamic type to simplify integration.
Suppressing C# Compiler WarningsSuppressing C# Compiler Warnings
The C# compiler can generate warnings to indicate possible problems with source code that do not prevent compilation. In some circumstances warnings are expected and may be ignored. In such situations, individual types of warning can be suppressed.
C# Named ParametersC# Named Parameters
With the introduction of C# 4.0, named parameters have been included in the language. Named parameters can be used to enhance the readability of source code and simplify some calls by specifying which parameters the argument values refer to.
C# Optional ParametersC# Optional Parameters
C# 4.0 introduces optional parameters to the language for methods, constructors, indexers and delegates. Optional arguments can be defined within a member's signature but omitted from calls to that member, in which case default values are used instead.
#line hidden and #line default#line hidden and #line default
The #line directive allows complete control over the perceived line numbers of a project. This is primarily of use to metaprogramming tools that generate code. The directive includes a variant that allows lines to be hidden from source-level debuggers.
C# Lambda ExpressionsC# Lambda Expressions
C# 3.0 and the .NET framework 3.5 introduced lambda expressions to the language. Lambda expressions permit the creation of anonymous functions with a very concise syntax. They are often used to quickly create delegates for use in LINQ queries.
<< Previous | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | Next >> |