Tutorial by Topics: o

Typically a struct is used only when performance is very important. Since value types live on the stack, they can be accessed much quicker than classes. However, the stack has much less room than the heap, so structs should be kept small (Microsoft recommends structs take up no more than 16 bytes)...
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.
When you use the yield keyword in a statement, you indicate that the method, operator, or get accessor in which it appears is an iterator. Using yield to define an iterator removes the need for an explicit extra class (the class that holds the state for an enumeration) when you implement the IEnumer...
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...
SpeechRecognitionEngine() SpeechRecognitionEngine.LoadGrammar(Grammar grammar) SpeechRecognitionEngine.SetInputToDefaultAudioDevice() SpeechRecognitionEngine.RecognizeAsync(RecognizeMode mode) GrammarBuilder() GrammarBuilder.Append(Choices choices) Choices(params string[] choices) Grammar(G...
Expression Trees are Expressions arranged in a treelike data structure. Each node in the tree is a representation of an expression, an expression being code. An In-Memory representation of a Lambda expression would be an Expression tree, which holds the actual elements (i.e. code) of the query, but ...
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...
The nameof operator allows you to get the name of a variable, type or member in string form without hard-coding it as a literal. The operation is evaluated at compile-time, which means that you can rename a referenced identifier, using an IDE's rename feature, and the name string will update with i...
In order to be able to use the unsafe keyword in a .Net project, you must check "Allow unsafe code" in Project Properties => Build Using unsafe code can improve performance, however, it is at the expense of code safety (hence the term unsafe). For instance, when you use a for lo...
When deciding on how to create a property, start with an auto-implemented property for simplicity and brevity. Switch to a property with a backing field only when circumstances dictate. If you need other manipulations beyond a simple set and get, you may need to introduce a backing field.
If you want to learn more about the Android Gradle Plugin setting check out the android-gradle Documentation. If you are interested in alternative emulators, you could look at Genymotion. It provides a free plan and requires smaller amount of RAM. VersionAPI LevelVersion CodeRelease Date1.01B...
Objects of type Throwable and its subtypes can be sent up the stack with the throw keyword and caught with try…catch statements. void someMethod() throws SomeException { } //method declaration, forces method callers to catch if SomeException is a checked exception type try { someMethod();...
The collections framework in java.util provides a number of generic classes for sets of data with functionality that can't be provided by regular arrays. Collections framework contains interfaces for Collection<O>, with main sub-interfaces List<O> and Set<O>, and mapping collectio...
Lambda expressions provide a clear and concise way of implementing a single-method interface using an expression. They allow you to reduce the amount of code you have to create and maintain. While similar to anonymous classes, they have no type information by themselves. Type inference needs to happ...
Java I/O (Input and Output) is used to process the input and produce the output. Java uses the concept of stream to make I/O operation fast. The java.io package contains all the classes required for input and output operations. Handling files is also done in java by Java I/O API.

Page 2 of 283