- 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
Samual Sam has Published 2492 Articles
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
Samual Sam
779 Views
The following is our list with elements −IList emp = new List() { new Employee() { EmployeeRank = 4, EmpName = "Amit", EmpMarks = 90 } , new Employee() { EmployeeRank = 05, EmpName = "Raman", EmpMarks = 95 } };Now use orderby and descending to sort elements ... Read More
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
Samual Sam
157 Views
The Full Date Long Time standard format specifier’s custom date and time format string is defined by the current DateTimeFormatInfo.FullDateTimePattern property.The custom format string is −dddd, dd MMMM yyyy HH:mm:ssExample Live Demousing System; using System.Globalization; class Demo { static void Main() { DateTime myDate = new DateTime(2018, ... Read More
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
Samual Sam
423 Views
Use Select method and Lambda Expression to calculate the cube of elements.The following is our list.List list = new List { 2, 4, 5, 7 };Now, use the Select() method and calculate the cube.list.AsQueryable().Select(c => c * c * c);The following is the entire example.Example Live Demousing System; using System.Linq; using ... Read More
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
Samual Sam
4K+ Views
To cast a specific type to its IEnumerable equivalent, use the AsEnumerable() method. It is an extension method.The following is our array −int[] arr = new int[5]; arr[0] = 10; arr[1] = 20; arr[2] = 30; arr[3] = 40; arr[4] = 50;Now, get the IEnumerable equivalent.arr.AsEnumerable();Example Live Demousing System; using System.Linq; ... Read More
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
Samual Sam
1K+ Views
The method matches instances of a pattern and is used to extract value based on a pattern.Let us see hoe to check for a valid URL.For that, pass the regex expression in the Matches method.MatchCollection mc = Regex.Matches(text, expr);Above, the expr is our expression that we have set to check ... Read More
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
Samual Sam
8K+ Views
To convert a specified value to a double-precision floating-point number, use Convert.ToDouble() method.The following is our long value −long[] val = { 340, -200};Now convert it to Double.double result; result = Convert.ToDouble(val);Example Live Demousing System; public class Demo { public static void Main() { long[] val = ... Read More
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
Samual Sam
869 Views
To return the number of images in a document, use the images property in JavaScript.ExampleYou can try to run the following code to get the count of images −Live Demo var val = document.images.length; document.write("Number of images in the document: "+val);
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
Samual Sam
3K+ Views
The following is our Dictionary with some elements −Dictionary d = new Dictionary() { {1, "Electronics"}, {2, "Clothing"}, {3, "Toys"}, {4, "Footwear"}, {5, "Accessories"} };Now to display the first element, set the key like this.d[1];The above displays the first element.Example Live Demousing System; using System.Collections.Generic; public ... Read More
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
Samual Sam
210 Views
The "d" format specifier represents a custom date and time format string.The format string is defined by culture's DateTimeFormatInfo.ShortDatePattern property.The custom format string is −MM/dd/yyyyExample Live Demousing System; using System.Globalization; class Demo { static void Main() { DateTime myDate = new DateTime(2018, 9, 09); ... Read More
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
Samual Sam
126 Views
A % in a format string would multiply a number by 100 before it is formatted.The percent symbol is added in the number at the location where the % appears.For an example, declare and initialize a double variable.double d = .045;Now, use % custom specifier to multiply number by 100.d.ToString("#0.##%", ... Read More