- 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
Found 34489 Articles for Programming
![Chandu yadav](https://www.tutorialspoint.com/assets/profiles/22330/profile/60_142811-1519038104.jpg)
169 Views
SByte represents an 8-bit signed integer.To implicitly convert an 8-bit signed integer to a Decimal, firstly set an sbyte value.sbyte val = 51;To convert sbyte to decimal, assign the value.decimal d; d = val;Let us see another example.Exampleusing System; public class Demo { public static void Main() { sbyte val = 39; decimal d; Console.WriteLine("Implicit conversion from 8-bit signed integer (sbyte) to Decimal"); d = val; Console.WriteLine("Decimal = "+dec); } }
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
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"); Console.WriteLine("File moved successfully!"); } }
![Arjun Thakur](https://www.tutorialspoint.com/assets/profiles/13574/profile/60_74441-1560315595.jpg)
215 Views
The Year Month format specifier represents a custom date and time format string.It is defined by the DateTimeFormatInfo.YearMonthPattern property.Here is the custom format string.yyyy MMMMExample Live Demousing System; using System.Globalization; class Demo { static void Main() { DateTime date = new DateTime(2018, 9, 7, 7, 55, 20); Console.WriteLine(date.ToString("Y",CultureInfo.CreateSpecificCulture("en-US"))); } }OutputSeptember 2018
![karthikeya Boyini](https://www.tutorialspoint.com/assets/profiles/13518/profile/60_31598-1537784993.jpg)
109 Views
The following is our LinkedList.string [] employees = {"Patrick", "Robert", "John", "Jacob", "Jamie"}; LinkedList list = new LinkedList(employees);Now, let’s say you need to remove the last node i.e. “Jamie”. For that, use the RemoveLast() method.list.RemoveLast();Example Live Demousing System; using System.Collections.Generic; class Demo { static void Main() { string [] employees = {"Patrick", "Robert", "John", "Jacob", "Jamie"}; LinkedList list = new LinkedList(employees); foreach (var emp in list) { Console.WriteLine(emp); } // removing last node list.RemoveLast(); Console.WriteLine("LinkedList ... Read More
![Ankith Reddy](https://www.tutorialspoint.com/assets/profiles/22328/profile/60_142162-1519038074.jpg)
294 Views
Firstly, declare a LinkedList and add nodes.int [] num = {92, 98, 110, 130, 145, 170, 230, 240, 250, 300, 330}; LinkedList myList = new LinkedList(num);Remove the last node from the LinkedList using the RemoveLast() method.myList.RemoveLast();Example Live Demousing System; using System.Collections.Generic; class Demo { static void Main() { int [] num = {92, 98, 110, 130, 145, 170, 230, 240, 250, 300, 330}; LinkedList myList = new LinkedList(num); foreach (var n in myList) { Console.WriteLine(n); } // removing last node myList.RemoveLast(); Console.WriteLine("LinkedList after removing the last node..."); foreach (var n in myList) { Console.WriteLine(n); } } }Output92 98 110 130 145 170 230 240 250 300 330 LinkedList after removing the last node... 92 98 110 130 145 170 230 240 250 300
![George John](https://www.tutorialspoint.com/assets/profiles/13511/profile/60_58410-1512537824.png)
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() { int val = 767; decimal d; Console.WriteLine("Implicit conversion from Int32 (integer) to Decimal"); d = val; Console.WriteLine("Decimal : "+dec); } }
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
147 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 Main() { string [] employees = {"Peter", "Robert", "John", "Jacob"}; LinkedList list = new LinkedList(employees); foreach (var emp in list) { Console.WriteLine(emp); } // removing first node list.RemoveFirst(); ... Read More
![Chandu yadav](https://www.tutorialspoint.com/assets/profiles/22330/profile/60_142811-1519038104.jpg)
731 Views
The following is our string array −string[] arr = { "Java", "HTML", "CSS", "JavaScript"};Use the Aggregate method and set a Lambda Expression to find the string with more number of characters.Here, the resultant string should have more number of characters than the initial seed value i.e. “jQuery” here.Example Live Demousing System; using System.Linq; class Demo { static void Main() { string[] arr = { "Java", "HTML", "CSS", "JavaScript"}; string res = arr.AsQueryable().Aggregate("jQuery", (longest, next) => next.Length > longest.Length ? next : longest, str => str.ToLower()); Console.WriteLine("String with more ... Read More
![karthikeya Boyini](https://www.tutorialspoint.com/assets/profiles/13518/profile/60_31598-1537784993.jpg)
431 Views
Let’s say the following is our LinkedList with integer nodes.int [] num = {29, 40, 67, 89, 198, 234}; LinkedList myList = new LinkedList(num);Now, if you want to remove the first element from the list, then use the RemoveFirst() method.myList.RemoveFirst();Example Live Demousing System; using System.Collections.Generic; class Demo { static void Main() { int [] num = {29, 40, 67, 89, 198, 234}; LinkedList myList = new LinkedList(num); foreach (var n in myList) { Console.WriteLine(n); } // removing first node myList.RemoveFirst(); Console.WriteLine("LinkedList after removing the first node..."); foreach (var n in myList) { Console.WriteLine(n); } } }Output29 40 67 89 198 234 LinkedList after removing the first node... 40 67 89 198 234
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
4K+ 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 second parameter.Convert.ToString(val, 16)Example Live Demousing System; class Demo { static void Main() { int val = 9898; Console.WriteLine("Integer: "+val); Console.Write("Hex String: "+Convert.ToString(val, 16)); } }OutputInteger: 9898 Hex String: 26aa