- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
George John has Published 1167 Articles
![George John](https://www.tutorialspoint.com/assets/profiles/13511/profile/60_58410-1512537824.png)
George John
8K+ Views
Set a list.List list = new List { 150, 300, 400, 350, 450, 550, 600 };To get the smallest element, use the Min() method.list.AsQueryable().Min();To get the largest element, use the Max() method.list.AsQueryable().Max();Let us see the complete code −Example Live Demousing System; using System.Collections.Generic; using System.Linq; class Demo { static void ... Read More
![George John](https://www.tutorialspoint.com/assets/profiles/13511/profile/60_58410-1512537824.png)
George John
184 Views
Action delegate does not return a value and can be used with a method that has a void return type.Declare Action Delegate.Action del = Display;Here is our method −public static void Display(int val) { Console.WriteLine(val); }Now call the method with a value.Example Live Demousing System; public class Demo { ... Read More
![George John](https://www.tutorialspoint.com/assets/profiles/13511/profile/60_58410-1512537824.png)
George John
507 Views
Let us first declare a nested tuple.var tuple = Tuple.Create(100, 200, 300, 400, 500, 600, Tuple.Create(720, 750, 780), 800 );Above, we added a nested tuple using Tuple.Create.Now to display elements in a nested tuple, nest the Item properties. Sine 7th item in the tuple is nested, we will be using ... Read More
![George John](https://www.tutorialspoint.com/assets/profiles/13511/profile/60_58410-1512537824.png)
George John
7K+ Views
Firstly, set two lists.List val1 = new List { 25, 30, 40, 60, 80, 95, 110 }; List val2 = new List { 27, 35, 40, 75, 95, 100, 110 };Now, use the Intersect() method to get the intersection between two lists.IEnumerable res = val1.AsQueryable().Intersect(val2);Example Live Demousing System; using System.Collections.Generic; using ... Read More
![George John](https://www.tutorialspoint.com/assets/profiles/13511/profile/60_58410-1512537824.png)
George John
458 Views
The Aggregate() method applies an accumulator function over a sequence.The following is our array −string[] arr = { "DemoOne", "DemoTwo", "DemoThree", "DemoFour"};Now use the Aggregate() method. We have set the ssed value as “DemoFive” for comparison.string res = arr.AsQueryable().Aggregate("DemoFive", (longest, next) => next.Length > longest.Length ? next : longest, str ... Read More
![George John](https://www.tutorialspoint.com/assets/profiles/13511/profile/60_58410-1512537824.png)
George John
545 Views
To get the distinct elements, use the Distinct() method.The following is our list with duplicate elements.List points = new List { 5, 10, 5, 20, 30, 30, 40, 50, 60, 70 };Now to get the distinct elements −points.AsQueryable().Distinct();Let us see the entire example −Example Live Demousing System; using System.Linq; using System.Collections.Generic; ... Read More
![George John](https://www.tutorialspoint.com/assets/profiles/13511/profile/60_58410-1512537824.png)
George John
177 Views
Hashtable class represents a collection of key-and-value pairs that are organized based on the hash code of the key. It uses the key to access the elements in the collection.Dictionary is a collection of keys and values in C#. Dictionary is included in the System.Collection.Generics namespace.Hashtable is slower than Dictionary. ... Read More
![George John](https://www.tutorialspoint.com/assets/profiles/13511/profile/60_58410-1512537824.png)
George John
151 Views
Use the CSS :last-child selector to style every elements that is the last child of its parent. You can try to run the following code to implement the :last-child selectorLive Demo p:last-child { background: orange; } This is demo text1. This is demo text2. This is demo text3.
![George John](https://www.tutorialspoint.com/assets/profiles/13511/profile/60_58410-1512537824.png)
George John
240 Views
EnumerateFile() method is used in C# to get all the files. Use AllDirectories property to recurse through directories −Directory.EnumerateFiles(@"D:\NEW", "*.*", SearchOption.AllDirectories)To get the list of files in a directory, use the SearchOptions.AllDirectories in C# as shown above.Let us see how −Exampleusing System; using System.IO; namespace Demo { class Program ... Read More
![George John](https://www.tutorialspoint.com/assets/profiles/13511/profile/60_58410-1512537824.png)
George John
139 Views
Use the matrix3d(n, n, n, n, n, n, n, n, n, n, n, n, n, n, n, n) method to transform the element using 16 values of matrix.Let us see the syntaxmatrix3d(a1, b1, c1, d1, a2, b2, c2, d2, a3, b3, c3, d3, a4, b4, c4, d4)Here, a1 b1 c1 ... Read More