- 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
218 Views
Convert a specified value to a 32-bit unsigned integer using the Convert.ToUInt32 method.The following is our string.string str = "210";Now, let us convert it to a 32-bit unsigned integer.uint res; res = Convert.ToUInt32(str);Example Live Demousing System; public class Demo { public static void Main() { string str ... Read More
![karthikeya Boyini](https://www.tutorialspoint.com/assets/profiles/13518/profile/60_31598-1537784993.jpg)
karthikeya Boyini
155 Views
Use the Math.DivRem method to calculate the quotient of two numbers and return the remainder.Firstly, set dividend and divisor.// dividend long dividend = 30; // divisor long divisor = 7;Now, use the DivRem method.long quotient = Math.DivRem(dividend, divisor, out rem);Example Live Demousing System; using System.Globalization; class Demo { static void ... Read More
![karthikeya Boyini](https://www.tutorialspoint.com/assets/profiles/13518/profile/60_31598-1537784993.jpg)
karthikeya Boyini
272 Views
The WindowWidth property gets or sets the width of the console window.Declare a variable.int width;Now, get the width of the current window.width = Console.WindowWidth;The following is the complete example.Example Live Demousing System; using System.Numerics; using System.Globalization; class Demo { static void Main() { int width; ... Read More
![karthikeya Boyini](https://www.tutorialspoint.com/assets/profiles/13518/profile/60_31598-1537784993.jpg)
karthikeya Boyini
1K+ Views
Get the last element from a sequence using the Linq Last() method.The following is our array.int[] val = { 10, 20, 30, 40 };Now, get the last element.val.AsQueryable().Last();Example Live Demousing System; using System.Collections.Generic; using System.Linq; class Demo { static void Main() { int[] val = { 10, ... Read More
![karthikeya Boyini](https://www.tutorialspoint.com/assets/profiles/13518/profile/60_31598-1537784993.jpg)
karthikeya Boyini
2K+ Views
The “0” custom specifier is a zero placeholder.If the value to be formatted has a digit in the position where the zero appears in the format string, the the digit is copied to the resultant string. However, if this doesn’t happen, then a zero appears.Here is our double variable.double d; ... Read More
![karthikeya Boyini](https://www.tutorialspoint.com/assets/profiles/13518/profile/60_31598-1537784993.jpg)
karthikeya Boyini
320 Views
BinarySearch() works on a sorted list whether its numeric, alphanumeric or strings. It finds you the index of an element.Let’s say the following is our list.List list = new List(); list.Add(70); list.Add(150); list.Add(220); list.Add(250); list.Add(300);Now to check the index where 250 is placed, use BinarySearch() method.list.BinarySearch(250);Example Live Demousing System; using System.Collections.Generic; ... Read More
![karthikeya Boyini](https://www.tutorialspoint.com/assets/profiles/13518/profile/60_31598-1537784993.jpg)
karthikeya Boyini
224 Views
The ElementAt() method in C# to get elements at specified index position.Firstly, set the string array.string[] str = { "Jack", "Pat", "David"};Now, to get the element at a particular index, use the ElementAt() method as shown in the following example −Example Live Demousing System.IO; using System; using System.Linq; class Program { ... Read More
![karthikeya Boyini](https://www.tutorialspoint.com/assets/profiles/13518/profile/60_31598-1537784993.jpg)
karthikeya Boyini
2K+ Views
Use Linq Contains() method to search for as specific string in an array of strings.string[] arr = { "Bag", "Pen", "Pencil"};Now, add the string in a string variable i.e. the string you want to search.string str = "Pen";Use the Contains() method to search the above string.arr.AsQueryable().Contains(str);Let us see the entire ... Read More
![karthikeya Boyini](https://www.tutorialspoint.com/assets/profiles/13518/profile/60_31598-1537784993.jpg)
karthikeya Boyini
667 Views
OverflowException is thrown when the parameter value is out of integer ranges.Let us see an example.When we set a value to int.Parse() method that is out of integer range, then OverflowException is thrown as shown below −Example Live Demousing System; class Demo { static void Main() { ... Read More
![karthikeya Boyini](https://www.tutorialspoint.com/assets/profiles/13518/profile/60_31598-1537784993.jpg)
karthikeya Boyini
1K+ Views
To convert a Double value to an Int64 value, use the Convert.ToInt64() method.Int64 represents a 64-bit signed integer.Let’s say the following is our double value.double val = 23.951213e12;Now to convert it to Int64.long longVal = Convert.ToInt64(val);Let us see the complete example.Example Live Demousing System; public class Demo { public static ... Read More