Tags

LINQ Query Operators

LINQ provides more than 50 query operators for different functionalities. Every query operator is an extension method. These operators can be categorized into following one: Operator Category LINQ Query Operators Names Filtering Where, OfType Sorting OrderBy, OrderByDescending, ThenBy, ThenByDescending Set Except, Interse...

Continue Reading

LINQ Query Syntax and Method Syntax

LINQ provides two syntax for writing queries. Query syntax Method Syntax Query Syntax Query syntax is like SQL like query syntax. Query syntax is easier to read and write than Method syntax. But Query syntax does not support all query operators of LINQ. A query syntax must begin with a from clause. The from clause specify data source (sequence) from which we need to get the dat...

Continue Reading

LINQ Basics

Before we start learning LINQ language, we must learn some basic knowledge of most used concepts in LINQ. Sequence A sequence is any collection object that implements the IEnumerable<> interface. LINQ queries only works with the sequences. static void Main(string[] args) { List<string> countries = new List<string>(); countries.Add("India"); countries.A...

Continue Reading

LINQ Introduction

LINQ is an acronym for Language Integrated Query. LINQ is introduced in .NET 3.5. Before LINQ, developers need to use different languages for retrieving and saving different data sources. For example if you want to retrieve data from SQL or Oracle database you must learn some basics of SQL query language, and for retrieving data from XML files you need to learn XML parsers. LINQ provides an un...

Continue Reading

LINQ Overview

Welcome to LINQ Tutorials. LINQ provides an uniform and powerful SQL like query language in C#/VB.NET to query different data sources. In the tutorial, we will learn all to basics and advanced LINQ language and how to use it your own projects with some live examples. We will go step by step first when LINQ introduced and its main features, LINQ Query Operators. Then how to use LINQ with dif...

Continue Reading

Wonderful Quotes Android App

Hi Guys Just want to share my new android app "Wonderful Quotes". This app is all about quotes from various philosopher and famous persons around the world. Kindly download and review my app by placing comments in the Google Play Store. Wonderful Quotes App Link https://play.google.com/store/apps/details?id=com.dotnetpattern.wonderfulquotesapp&hl=en Some of the featur...

Continue Reading

Top LINQ Interview Questions and Answers - Part 2

Question 11. What is the use of into keyword in LINQ? 'into' keyword lets us save the intermediate result into a variable. We can further write LINQ query against this variable. static string[] names = { "Kapil Malhotra", "Michael Jackson", "Miami Sinha" }; static void Main(string[] args) { var result = from name in names where name.StartsWith("M") ...

Continue Reading

Top LINQ Interview Questions and Answers - Part 1

Question 1. What is LINQ? LINQ stands for Language INtegrated Query. LINQ allows us to write queries over local collection objects and remote data sources like SQL, XML documents etc. We can write LINQ query on any collection class which implements the IEnumerable interface. Question 2. What is Sequence and Query Operators in LINQ? Sequence is a collection class on which you like to q...

Continue Reading

Top 10 C# / .NET OOPS Interview Questions and Answers

Question 1. What is Object Oriented Programming (OOPS)? OOPS is a technique to develop modules. These modules are assembled together as software. OOPS works on the objects. Everything in OOPS is object. Object is made up of states and behaviors. Objects communicate with each other by sending messages to each other. Object hierarchy are built using Aggregation and Composition. Some popula...

Continue Reading

Top 10 C# / .NET Multithreading Interview Questions

Question 1. What is the difference between Threads and Tasks? Tasks are wrapper around Thread and ThreadPool classes. Below are some major differences between Threads and Tasks: A Task can return a result but there is no proper way to return a result from Thread. We can apply chaining on multiple tasks but we can not in threads. We can wait on Tasks without using Signalling. But in T...

Continue Reading