By Abhishek Sur Website: www.abhisheksur.comEmail : email@example.com
.NET Infrastructure User Interface Services Data Access ASP.NET Windows Windows Windows (Web Forms, Entity Presentation Communication Workflow ADO.NETMVC, Dynamic Framework Foundation Foundation Foundation Data) Win Forms Data Services LINQ to SQL Cloud (ODATA) Core Objects Generics LINQ Dynamic Async Base Class Library Common Language Runtime
What are loops ? A repetition of instructions ? A logical jump in code Or a representation of GoTo with a condition…Types of Loops While do-while for goto ?... Lets take an example
Represented by IEnumerable and IEnumerator (which is not a collection) Ability to Pause – Resume a method. foreach is a syntactic sugar to iterate over an iterator. Yield is used to generate an iterator
Delegates Delegates are special types Delegate points to Methods MulticastDelegates maintains an Invocation ListEvents Events are Wrappers to Delegates Cleaner pattern to handle Delegates Allows components to subscribe to it by passing event handlers.
Generics Type as Template Constraint on Generic Types It can be applied on Types, Method, Delegates etc. Variance is supportedExtension Methods Extend your predefined Types without inheritance Uses ExtensionAttribute to identify extension method.
Anonymous Language Object Object can exist in language without name Cleaner codebase. Anonymous methods are used as Closures. We use delegate to refer anonymous methods and var for types.LINQ Search inside Managed objects Simple projection, selection, grouping, joins and many more…
Dynamic in .NET 4.0 CLR is mostly static type ◦ Compile time type checking DLR added dynamism to .NET ◦ Run time type checking Object – Static type, base class var – is ALSO static type, compiler inferred dynamic – Evaluation deferred Expandable objects
New Asynchronous Pattern Contextual async & await pattern simplifies complex Threading model or existing pattern of coding Async is not about Concurrency but rather it is truly asynchrony. It can easily plugged in without changing the logic. Compiler generates state machine to resume methods