- 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
27K+ Views
The "C" (or currency) format specifier is used to convert a number to a string representing a currency amount.Let us see an example.double value = 139.87;Now to display the above number until three decimal places, use (“C3”) currency format specifier.value.ToString("C3", CultureInfo.CurrentCulture)Let us see another example.Example Live Demousing System; using System.Globalization; class ... Read More
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
Samual Sam
158 Views
If you want to get the pixels the document scrolled to from the upper left corner of the window, then use the pageXoffset and pageYoffset property. Use pageXoffset for horizontal pixels.ExampleYou can try to run the following code to learn how to work with pageXOffset property in JavaScript −Live Demo ... Read More
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
Samual Sam
146 Views
To remove a node at the beginning of a LinkedList, use the RemoveFirst() method.string [] employees = {"Peter", "Robert", "John", "Jacob"}; LinkedList list = new LinkedList(employees);Now, to remove the first element, use the RemoveFirst() method.list.RemoveFirst();Let us see the complete example.Example Live Demousing System; using System.Collections.Generic; class Demo { static void ... Read More
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
Samual Sam
1K+ Views
Use the Move method to rename a file.Let’s say the file name is −D:\tom.txtNow, to update it to the following, use the Move() method.D:\tim.txtLet us see the complete code.Exampleusing System; using System.IO; public class Demo { public static void Main() { File.Move(@"D:\tom.txt", @"D:\tim.txt"); ... Read More
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
Samual Sam
302 Views
The ulong type represents a 64-bit unsigned integer i.e. UInt64.To implicitly convert a 64-bit unsigned integer to a Decimal, firstly set UInt64 value.ulong val = ulong.MaxValue;To convert ulong to decimal, assign the value.decimal dec; dec = val;Let us see the above example.Example Live Demousing System; public class Demo { public ... Read More
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
Samual Sam
1K+ Views
Use the Remove() method to remove the first occurrence of a node in a LinkedList.Firstly, let us set a LinkedList with integer elements.int [] num = {2, 5, 7, 15}; LinkedList list = new LinkedList(num);Now, let’s say you need to remove node with element 7. For that, use the Remove() ... Read More
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
Samual Sam
3K+ Views
To represent Int32 as a Hexadecimal string in C#, use the ToString() method and set the base as the ToString() method’s second parameter i.e. 16 for Hexadecimal.Int32 represents a 32-bit signed integer.Firstly, set an Int32 variable.int val = 9898;Now, convert it to a hexadecimal string by including 16 as the ... Read More
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
Samual Sam
161 Views
The short type represents a 16-bit signed integer i.e. Int16.To implicitly convert a 16-bit signed integer to a Decimal, firstly set a short value.short val = -32768;To convert short to decimal, assign the value.dec = val;Let us see another example.Example Live Demousing System; public class Demo { public static void ... Read More
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
Samual Sam
3K+ Views
Use the Linq Average() method to find the average of a sequence of numeric values.Firstly, set a sequence.List list = new List { 5, 8, 13, 35, 67 };Now, use the Queryable Average() method to get the average.Queryable.Average(list.AsQueryable());Example Live Demousing System; using System.Linq; using System.Collections.Generic; class Demo { static void ... Read More
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
Samual Sam
307 Views
Pad the beginning of the string with spaces using the PadLeft() method. You can also pad it with a Unicode character.Let’s say the following is our string.string myStr = "DemoOne";To set a padding at the beginning of the above string, use the PadLeft method.myStr.PadLeft(10);Here is the complete example.Example Live Demousing System; ... Read More