Tutorial by Topics: en

ParameterDetailsthis cnnThe underlying database connection - the this denotes an extension method; the connection does not need to be open - if it is not open, it is opened and closed automatically.<T> / Type(optional) The type of object to return; if the non-generic / non-Type API is used, a...
public static ReturnType MyExtensionMethod(this TargetType target) public static ReturnType MyExtensionMethod(this TargetType target, TArg1 arg1, ...) ParameterDetailsthisThe first parameter of an extension method should always be preceded by the this keyword, followed by the identifier wi...
public void SomeMethod <T> () { } public void SomeMethod<T, V>() { } public T SomeMethod<T>(IEnumerable<T> sequence) { ... } public void SomeMethod<T>() where T : new() { } public void SomeMethod<T, V>() where T : new() where V : struct { } public void Som...
The currently relevant HTTP/1.1 RFCs are: 7230: Message Syntax and Routing 7231: Semantics and Content 7232: Conditional Requests 7233: Range Requests 7234: Caching 7235: Authenticaion 7239: Forwarded HTTP Extension 7240: Prefer Header for HTTP There's also the following informational...
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 ...
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...
An event is a notification that something has occurred (such as a mouse click) or, in some cases, is about to occur (such as a price change). Classes can define events and their instances (objects) may raise these events. For instance, a Button may contain a Click event that gets raised when a user...
SpeechRecognitionEngine() SpeechRecognitionEngine.LoadGrammar(Grammar grammar) SpeechRecognitionEngine.SetInputToDefaultAudioDevice() SpeechRecognitionEngine.RecognizeAsync(RecognizeMode mode) GrammarBuilder() GrammarBuilder.Append(Choices choices) Choices(params string[] choices) Grammar(G...
Generics are a facility of generic programming that extend Java's type system to allow a type or method to operate on objects of various types while providing compile-time type safety. In particular, the Java collections framework supports generics to specify the type of objects stored in a collecti...
An Intent is a small message passed around the Android system. This message may hold information about our intention to perform a task. It is basically a passive data structure holding an abstract description of an action to be performed. Intent Intent() Intent Intent(Intent intent) Intent ...
Note that a ViewTreeObserver instance associated with a View instance can become invalid while that View is still alive. From the View.getViewTreeObserver javadocs: // The returned ViewTreeObserver observer is not guaranteed to remain // valid for the lifetime of this View. If the caller of this...
SharedPreferences provide a way to save data to disk in the form of key-value pairs. Context Method public SharedPreferences getSharedPreferences(String name, int mode) Activity Method public SharedPreferences getPreferences() SharedPreferences Methods public SharedPre...
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...
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. /** -- ...
Java enums (declared using the enum keyword) are shorthand syntax for sizable quantities of constants of a single class. [public/protected/private] enum Enum_name { // Declare a new enum. ENUM_CONSTANT_1[, ENUM_CONSTANT_2...]; // Declare the enum constants. This must be the first line inside of t...
As of Java 8, Calendar and its subclasses have been superseded by the java.time package and its subpackages. They should be preferred, unless a legacy API requires Calendar.
Nashorn is a JavaScript engine developed in Java by Oracle, and has been released with Java 8. Nashorn allows embedding Javascript in Java applications via JSR-223 and allows to develop standalone Javascript applications, and it provides better runtime performance and better compliance with the ECMA...

Page 1 of 66