Tutorial by Topics: co

The only requirement for an object to be initialized using this syntactic sugar is that the type implements System.Collections.IEnumerable and the Add method. Although we call it a collection initializer, the object does not have to be an collection.
Constructors are methods in a class that are invoked when an instance of that class is created. Their main responsibility is to leave the new object in a useful and consistent state. Destructors/Finalizers are methods in a class that are invoked when an instance of that is destroyed. In C# they are...
There are several kinds of collection: Array List Queue SortedList Stack Dictionary
var result = possibleNullObject ?? defaultValue; ParameterDetailspossibleNullObjectThe value to test for null value. If non null, this value is returned. Must be a nullable type.defaultValueThe value returned if possibleNullObject is null. Must be the same type as possibleNullObject. The n...
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...
SpeechRecognitionEngine() SpeechRecognitionEngine.LoadGrammar(Grammar grammar) SpeechRecognitionEngine.SetInputToDefaultAudioDevice() SpeechRecognitionEngine.RecognizeAsync(RecognizeMode mode) GrammarBuilder() GrammarBuilder.Append(Choices choices) Choices(params string[] choices) Grammar(G...
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...
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...
All control structures, unless otherwise noted, make use of block statements. These are denoted by curly braces {}. This differs from normal statements, which do not require curly braces, but also come with a stiff caveat in that only the line immediately following the previous statement would b...
Concurrent computing is a form of computing in which several computations are executed concurrently instead of sequentially. Java language is designed to support concurrent programming through the usage of threads. Objects and resources can be accessed by multiple threads; each thread can potentiall...
public type name[ = value]; private type name[ = value]; protected type name[ = value]; type name[ = value]; public class name{ class name{ From the Java tutorial: Access level modifiers determine whether other classes can use a particular field or invoke a particular method. There a...
Documentation for java code is often generated using javadoc. Javadoc was created by Sun Microsystems for the purpose of generating API documentation in HTML format from java source code. Using the HTML format gives the convenience of being able to hyperlink related documents together. /** -- ...
This documentation page is for showing details with example about java class constructors and about Object Class Methods which are automatically inherited from the superclass Object of any newly created class. public final native Class<?> getClass() public final native void notify() pu...
Using HttpUrlConnection on Android requires that you add the Internet permission to your app (in the AndroidManifest.xml). There are also other Java HTTP clients and libraries, such as Square's OkHttp, which are easier to use, and may offer better performance or more features.
List comprehensions in Python are concise, syntactic constructs. They can be utilized to generate lists from other lists by applying functions to each element in the list. The following section explains and demonstrates the use of these expressions. [x + 1 for x in (1, 2, 3)] # list comprehen...
When using boolean coercion, the following values are considered "falsy": false 0 "" (empty string) null undefined NaN (not a number, e.g. 0/0) document.all¹ (browser context) Everything else is considered "truthy". ¹ willful violation of the ECMAScript ...

Page 1 of 62