BlackWaspTM

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# 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 signatures but omitted from calls to that member, in which case a default value is 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.
C# Event AccessorsC# Event Accessors
Events can easily be added to classes to allow objects to indicate when an action occurs. Using standard declarations, multiple subscribers can be added to a single event. To increase the level of control over subscriptions, you can use event accessors.
Using Extension Methods with EnumerationsUsing Extension Methods with Enumerations
Extension methods were introduced in .NET 3.5 to allow classes to be apparently extended without modifying the class's code or using inheritance. Extension methods can also be used to add extra behaviour to enumerations.
<< Previous | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | Next >> |