- 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
2K+ Views
The int type represents a 32-bit signed integer i.e. Int32.To implicitly convert an Int32 to a Decimal, firstly set a Int32 value.int val = 392;To convert Int32 to decimal, assign the value.decimal d; d = val;Let us see another example.Exampleusing System; public class Demo { public static void Main() ... Read More
![George John](https://www.tutorialspoint.com/assets/profiles/13511/profile/60_58410-1512537824.png)
George John
596 Views
Use Convert.ToInt32 method to convert text to an integer.Firstly, set a string.string str = "12";Now, use the Convert.ToInt32() method the above string to number.Convert.ToInt32(str);Let us see the complete example.Example Live Demousing System; class Program { static void Main() { string str = "12"; Console.WriteLine("String: ... Read More
![George John](https://www.tutorialspoint.com/assets/profiles/13511/profile/60_58410-1512537824.png)
George John
95 Views
The following is our LinkedList list with nodes.string [] students = {"Katie", "Jennifer", "Amy", "Vera"}; LinkedList list = new LinkedList(students);Now let us remove a node with the string element “Vera”.For that, use Remove() method.list.Remove("Vera");Example Live Demousing System; using System.Collections.Generic; class Demo { static void Main() { string ... Read More
![George John](https://www.tutorialspoint.com/assets/profiles/13511/profile/60_58410-1512537824.png)
George John
61 Views
We have a list without any element.List val = new List { };To display the default and avoid any error, use the FirstorDefault() method.val.AsQueryable().FirstOrDefault();You can also change the value to be displayed as default.Let us see the 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
10K+ Views
To display current month, firstly use “Now“ to get the current date.DateTime dt = DateTime.Now;Now, use the Month property to get the current month.dt.MonthLet us see the complete code.Example Live Demousing System; using System.Linq; public class Demo { public static void Main() { DateTime dt = DateTime.Now; ... Read More
![George John](https://www.tutorialspoint.com/assets/profiles/13511/profile/60_58410-1512537824.png)
George John
747 Views
The ("F") format specifier converts a number to a string of the following form −"-ddd.ddd…"Above, "d" indicates a digit (0-9).Let us see an example.Here, if we will set (“F3”) format specifier to add three values after decimal places, for let’s say, 212.212.000The following is another example −Example Live Demousing System; using ... Read More
![George John](https://www.tutorialspoint.com/assets/profiles/13511/profile/60_58410-1512537824.png)
George John
17K+ Views
Firstly, set the two dates.DateTime date1 = new DateTime(2018, 7, 15, 08, 15, 20); DateTime date2 = new DateTime(2018, 8, 17, 11, 14, 25);Now, calculate the difference between two dates.TimeSpan ts = date2 - date1;To calculate minutes.ts.TotalMinutesLet us see the complete code.Example Live Demousing System; using System.Linq; public class Demo { ... Read More
![George John](https://www.tutorialspoint.com/assets/profiles/13511/profile/60_58410-1512537824.png)
George John
6K+ Views
Firstly, get the current date.DateTime.TodayNow, use AddDays() method to add days to the current date. Here, we are adding 10 days to the current date.DateTime.Today.AddDays(10)Let us see the complete code −Example Live Demousing System; using System.Linq; public class Demo { public static void Main() { Console.WriteLine("Today = ... Read More
![George John](https://www.tutorialspoint.com/assets/profiles/13511/profile/60_58410-1512537824.png)
George John
297 Views
If any of the following string appears in the format string and followed by at least one zero, then the number is formatted with an “E” or “e” in between the number and the exponent."E" "E+" "E-" "e" "e+" "e-"Example Live Demousing System; using System.Globalization; class Demo { static void ... Read More