Tutorial by Topics: a

Provides a convenient syntax that ensures the correct use of IDisposable objects. using (disposable) { } using (IDisposable disposable = new MyDisposable()) { } The object in the using statement must implement the IDisposable interface. using(var obj = new MyObject()) { } class M...
\' — single quote (0x0027) \" — double quote (0x0022) \\ — backslash (0x005C) \0 — null (0x0000) \a — alert (0x0007) \b — backspace (0x0008) \f — form feed (0x000C) \n — new line (0x000A) \r — carriage return (0x000D) \t — horizontal tab (0x0009) \v — vertical tab (0x000B) \u0000 ...
X?.Y; //null if X is null else X.Y X?.Y?.Z; //null if X is null or Y is null else X.Y.Z X?[index]; //null if X is null else X[index] X?.ValueMethod(); //null if X is null else the result of X.ValueMethod(); X?.VoidMethod(); //do nothing if X is null else call X.VoidMethod(); Note that w...
NuGet.org: NuGet is the package manager for the Microsoft development platform including .NET. The NuGet client tools provide the ability to produce and consume packages. The NuGet Gallery is the central package repository used by all package authors and consumers. Images in examples courtes...
A lambda expression is a syntax for creating anonymous functions inline. More formally, from the C# Programming Guide: A lambda expression is an anonymous function that you can use to create delegates or expression tree types. By using lambda expressions, you can write local functions that can ...
In C#, a method declared async won't block within a synchronous process, in case of you're using I/O based operations (e.g. web access, working with files, ...). The result of such async marked methods may be awaited via the use of the awaitkeyword. An async method can return void, Task or Tas...
A thread is a part of a program that can execute independently of other parts. It can perform tasks simultaneously with other threads. Multithreading is a feature that enables programs to perform concurrent processing so that more than one operation can be done at a time. For example, you can use...
Purpose And Use Cases The purpose of the Task Parallel Library is to simplify the process of writing and maintaining multithreaded and parallel code. Some Use Cases*: Keeping a UI responsive by running background work on separate task Distributing workload Allowing a client application ...
Performance-critical applications in managed .NET applications can be severely impacted by the GC. When the GC runs, all other threads are suspended until it completes. For this reason, it is recommended to carefully evaluate the GC processes and determine how to minimize when it runs.
One of MEF's big advantages over other technologies that support the inversion-of-control pattern is that it supports resolving dependencies that are not known at design-time, without needing much (if any) configuration. All examples require a reference to the System.ComponentModel.Composition as...
public IEnumerable<RedisKey> Keys(int database = 0, RedisValue pattern = default(RedisValue), int pageSize = CursorUtils.DefaultPageSize, long cursor = CursorUtils.Origin, int pageOffset = 0, CommandFlags flags = CommandFlags.None) ParameterDetailsdatabaseRedis database index to connec...
SpeechRecognitionEngine() SpeechRecognitionEngine.LoadGrammar(Grammar grammar) SpeechRecognitionEngine.SetInputToDefaultAudioDevice() SpeechRecognitionEngine.RecognizeAsync(RecognizeMode mode) GrammarBuilder() GrammarBuilder.Append(Choices choices) Choices(params string[] choices) Grammar(G...
The process of overload resolution is described in the C# specification, section 7.5.3. Also relevant are the sections 7.5.2 (type inference) and 7.6.5 (invocation expressions). How overload resolution works will probably be changed in C# 7. The design notes indicate that Microsoft will roll out ...
The Format methods are a set of overloads in the System.String class used to create strings that combine objects into specific string representations. This information can be applied to String.Format, various WriteLine methods as well as other methods in the .NET framework. string.Format(strin...

Page 2 of 320