Friday, 6 January 2017

Difference between a stack, a queue and a heap

A stack keeps track of what is executing and contains stored value types to be accessed and processed as Last In First Out, with elements both inserted and deleted from the top end.

A queue lists items on a First In First Out basis in terms of both insertion and deletion, with the developer inserting items from the rear end and deleting items from the front end of the queue.


A heap contains stored reference types and is responsible for keeping track of more precise objects.

Read-only variables VS Constants

1. Read-only variables can support reference-type variables. Constants can hold only value-type variables.

2. Developers evaluate read-only variables at the runtime. They evaluate constants at the compile time.

LINQ

LINQ stands for Language Integrated Query.

Language-Integrated Query (LINQ) is an innovation introduced in Visual Studio 2008 and .NET Framework version 3.5 that bridges the gap between the world of objects and the world of data.

You can use LINQ queries in new projects, or alongside non-LINQ queries in existing projects. The only requirement is that the project target .NET Framework 3.5 or later.

This is a Microsoft programming model and methodology that offers developers a way to manipulate data using a succinct yet expressive syntax. It does so by instilling Microsoft .NET-based programming languages with the ability to make formal queries

In Visual Studio you can write LINQ queries in Visual Basic or C# with SQL Server databases, XML documents, ADO.NET Datasets, and any collection of objects that supports IEnumerable or the generic IEnumerable<T> interface. LINQ support for the ADO.NET Entity Framework is also planned, and LINQ providers are being written by third parties for many Web services and other database implementations.