Please enable JavaScript.
Coggle requires JavaScript to display documents.
.Net Important - Coggle Diagram
.Net Important
-
-
-
Collections (IPK)
Index-Based
Array
Fixed in size, type-safe and doesn't allow to add or remove items
-
Supports Multi Dimensional Array and has RANK property. Rank is the number of dimensions of an array
List
ArrayList
Array List is a Flexible Array - Dynamic in memory allocation. It does Boxing and Unboxing of Value Type to Object Type. Non-Generic
-
HashSet<T>
-
Mathematical Operations with Other Hashset. e.g., UnionWith(IEnumerable), ExceptWith, InstersectWith
-
-
-
-
Action, Function and Predicate
Action Delegate
-
- Static Method -> Public static void ActionMethodName. 2. It is mentioned as an Action Parameter in a method. -> public static void DoSomething(Action action). 3. DoSomething(ActionMethodName)
Func Delegate
-
Func<string, int, object> --> Accepts two parameters and returns a object type
Pass method name matching the signature as parameter, followed by other parameters. public static void Check(Func<string, int, object> func, string input, int count)
-
-
Predicate Delegate
-
-
- Predicate<int> u=isEven = delegate(int number) {return num % 2 == 0 };, 2. static bool IsEven(int number) => num % 2 == 0;
Delegate
A delegate is a type that represents references to methods with a particular parameter list and return type.
-> public delegate int PerformCalculation(int x, int y);
Enumerator & IEnumerable
IEnumerable is used to find an object which is used as an interface. It is used for the iteration of all the elements in the collection. The iteration process makes it easier to traverse in the collection. It acts as an object. GetEnumerator is a method that is used for the implementation of the IEnumerator interface.
IEnumerator has two methods, Reset() and MoveNext(), and has an extended property which is known as Current. MoveNext() is a method that produces a Boolean value that points out the end element of the list. The reset method makes the enumerator its default position.
-
.Net Standard
.Net Core and .Net FW has there own BCL (Base-Class Libraries - Contains Basic or Built-in Types). This causes problem with Inter-operable libraries.
.Net Standard is a common BCL layout or contract to be used across all future and current technologies of microsoft .Net
Extension Method
-
-
-
Extension methods can be added to custom, .NET Framework or third party classes, structs or interfaces.
The first parameter of the extension method must be of the type for which the extension method is applicable, preceded by the this keyword.
Extension methods can be used anywhere in the application by including the namespace of the extension method.
Indexes in SQL
-
-
Use [RECOMPILE] option on existing procedure so that it can create a new Execution plan after more indexes are created
Class Types
-
Sealed Keyword
Class can't be inherited, Method can't be overriden
-
Generics <T>
Generics enable types (classes and interfaces) to be parameters when defining classes, interfaces and methods. Much like the more familiar formal parameters used in method declarations, type parameters provide a way for you to re-use the same code with different inputs.
Non-Generic Types
ArrayList, Stack, Queue, Hashtable
Generic Types
Array, List<T>, HashSet<T>, Dictionary<T,T>, SortedList <T,T>
Async Programming - TPL - Task Parallel Library, Threads, Task, Delegate, Async-Await
LINQ, Lambdas
Atomic - Transaction
A transaction must be Atomic, meaning all changes made by the transaction are completed as a single unit.
-
Garbage Collection
The garbage collector (GC) manages the allocation and release of memory. The garbage collector serves as an automatic memory manager.
The memory to each Generation will be given by the Common Language Runtime(CLR) depending on the project size.
The heap memory is divided into number of generations. Normally it is three generations. Generation 0, Generation 1 and Generation 2
Generation 0 : All the short-lived objects such as temporary variables are contained in the generation 0 of the heap memory. All the newly allocated objects are also generation 0 objects implicitly unless they are large objects. In general, the frequency of garbage collection is the highest in generation 0.
Generation 1 : If space occupied by some generation 0 objects that are not released in a garbage collection run, then these objects get moved to generation 1. The objects in this generation are a sort of buffer between the short-lived objects in generation 0 and the long-lived objects in generation 2.
Generation 2 : If space occupied by some generation 1 objects that are not released in the next garbage collection run, then these objects get moved to generation 2. The objects in generation 2 are long lived such as static objects as they remain in the heap memory for the whole process duration.