- 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
Karthikeya Boyini has Published 2383 Articles
![karthikeya Boyini](https://www.tutorialspoint.com/assets/profiles/13518/profile/60_31598-1537784993.jpg)
karthikeya Boyini
122 Views
Use the BufferWidth gets or sets the width of the buffer area.Use the property like this −Console.BufferWidthLet us see the complete example.Example Live Demousing System; class Demo { static void Main() { Console.WriteLine("Buffer width (columns) = "+Console.BufferWidth); } }OutputBuffer width (columns) = 0
![karthikeya Boyini](https://www.tutorialspoint.com/assets/profiles/13518/profile/60_31598-1537784993.jpg)
karthikeya Boyini
438 Views
Find common elements between two arrays using the Intersect() method.The following are our arrays −int[] val1 = { 15, 20, 40, 60, 75, 90 }; int[] val2 = { 17, 25, 35, 55, 75, 90 };To perform intersection.val1.AsQueryable().Intersect(val2);Let us see the entire example.Example Live Demousing System; using System.Collections.Generic; using System.Linq; class ... Read More
![karthikeya Boyini](https://www.tutorialspoint.com/assets/profiles/13518/profile/60_31598-1537784993.jpg)
karthikeya Boyini
133 Views
Get the maximum value from a sequence using the Max() method.Let’s say the following is our list.List list = new List { 200, 400, 600, 800, 1000, 1200, 1400, 1600, 1800, 2000 };Use the Max() method to get the largest element.list.AsQueryable().Max();Example Live Demousing System; using System.Collections.Generic; using System.Linq; class Demo { ... Read More
![karthikeya Boyini](https://www.tutorialspoint.com/assets/profiles/13518/profile/60_31598-1537784993.jpg)
karthikeya Boyini
415 Views
Set Hashtable collection with elements.Hashtable h = new Hashtable(); h.Add(1, "Jack"); h.Add(2, "Henry"); h.Add(3, "Ben"); h.Add(4, "Chris");Let’s say now you need to find any key, then use the Contains() method. We are finding key 3 here −h.Contains(3);The following is the complete example.Example Live Demousing System; using System.Collections; public class Demo { ... Read More
![karthikeya Boyini](https://www.tutorialspoint.com/assets/profiles/13518/profile/60_31598-1537784993.jpg)
karthikeya Boyini
248 Views
Set a Hashtable collection and add some elements to it.Hashtable h = new Hashtable(); h.Add(1, "Sam"); h.Add(2, "Jack"); h.Add(3, "Andy"); h.Add(4, "Katie"); h.Add(5, "Beth"); h.Add(6, "Benjamin");Use the ContainsKey() method to check whether a key exists in a Hashtable or not.Let’s check for key 3. It returns True of the key ... Read More
![karthikeya Boyini](https://www.tutorialspoint.com/assets/profiles/13518/profile/60_31598-1537784993.jpg)
karthikeya Boyini
231 Views
Set a sequence and add elements.List ID = new List { 120, 111, 250, 111, 120, 300, 399, 450 };Use Distinct() method to get distinct element from the above list.IEnumerable res = ID.AsQueryable().Distinct();Let us see the complete code.Example Live Demousing System; using System.Linq; using System.Collections.Generic; class Demo { static void ... Read More
![karthikeya Boyini](https://www.tutorialspoint.com/assets/profiles/13518/profile/60_31598-1537784993.jpg)
karthikeya Boyini
2K+ Views
The ToString() method converts the value of this instance to its equivalent string representation.Firstly, set an enum.enum Vehicle { Car, Bus, Truck, Motobike };To convert it to an equivalent string representation, use ToString().Vehicle.Car.ToString("d")Example Live Demousing System; public class Demo { enum Vehicle { Car, Bus, Truck, Motobike }; public ... Read More
![karthikeya Boyini](https://www.tutorialspoint.com/assets/profiles/13518/profile/60_31598-1537784993.jpg)
karthikeya Boyini
2K+ Views
The Browser Object Model (BOM) in JavaScript includes the properties and methods for JavaScript to interact with the web browser.BOM provides you with a window objects, for example, to show the width and height of the window. It also includes the window.screen object to show the width and height of ... Read More
![karthikeya Boyini](https://www.tutorialspoint.com/assets/profiles/13518/profile/60_31598-1537784993.jpg)
karthikeya Boyini
59 Views
Use the screen.availHeight property to return the width of the user’s screen. The result will be in pixels and Taskbar feature won’t be included.ExampleYou can try to run the following code to learn how to work with the screen.availHeight property in JavaScript −Live Demo ... Read More
![karthikeya Boyini](https://www.tutorialspoint.com/assets/profiles/13518/profile/60_31598-1537784993.jpg)
karthikeya Boyini
254 Views
The "D" format specifier represents a custom date and time format string.The format string is defined by culture's DateTimeFormatInfo.LongDatePattern property.The custom format string is −dddd, dd MMMM yyyyExample Live Demousing System; using System.Globalization; class Demo { static void Main() { DateTime myDate = new DateTime(2018, 9, 20); ... Read More