Karthikeya Boyini has Published 2193 Articles

What is availHeight property in JavaScript?

karthikeya Boyini

karthikeya Boyini

Updated on 23-Jun-2020 08:03:15

87 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

Long Date ("D") Format Specifier in C#

karthikeya Boyini

karthikeya Boyini

Updated on 23-Jun-2020 07:59:35

354 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

LinkedList RemoveFirst() Method in C#

karthikeya Boyini

karthikeya Boyini

Updated on 23-Jun-2020 07:55:13

529 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 ... Read More

C# Program to remove a node at the end of the Linked List

karthikeya Boyini

karthikeya Boyini

Updated on 23-Jun-2020 07:52:28

175 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() {       ... Read More

LinkedList Clear() Method in C#

karthikeya Boyini

karthikeya Boyini

Updated on 23-Jun-2020 07:50:00

695 Views

Use the Clear() method to clear a LinkedList. This will remove all the nodes from the LinkedList.Let’s say the following is our LinkedList −int [] num = {30, 65, 80, 95, 110, 135}; LinkedList list = new LinkedList(num);To clear the LinkedList.list.Clear();Example Live Demousing System; using System.Collections.Generic; class Demo {    static ... Read More

C# Program to skip a specified number of elements of an array

karthikeya Boyini

karthikeya Boyini

Updated on 23-Jun-2020 07:47:50

621 Views

The following is our array −int[] points = { 210, 250, 300, 350, 420};Use skip() method to skip elements. Add the number as an argument that displays the number of elements to be returned.IEnumerable skipEle = points.AsQueryable().OrderByDescending(s => s).Skip(3);Example Live Demousing System; using System.Linq; using System.Collections.Generic; public class Demo {   ... Read More

Convert.ToSByte Method in C#

karthikeya Boyini

karthikeya Boyini

Updated on 23-Jun-2020 07:45:44

308 Views

Convert a specified value to an 8-bit signed integer i.e. SByte.It is a signed 8-bit integer data type which stores value between -128 to 127.Let us see an example. We have a double variable.double doubleNum = -19.9;Now, let us convert it to SByte.sbyte res; res = Convert.ToSByte(doubleNum);Example Live Demousing System; public ... Read More

Convert.ToInt32 Method in C#

karthikeya Boyini

karthikeya Boyini

Updated on 23-Jun-2020 07:43:49

6K+ Views

Use the Convert.ToInt32() method to convert a specified value to a 32-bit signed integer.Let us take a double variable.double doubleNum = 11.53;Now, we will convert it to Int32 using the Convert.ToInt32 method.int intNum; ntNum = Convert.ToInt32(doubleNum);Example Live Demousing System; public class Demo {    public static void Main() {     ... Read More

C# Program to add a node at the last position in a Linked List

karthikeya Boyini

karthikeya Boyini

Updated on 23-Jun-2020 07:41:13

228 Views

Set a LinkedList with nodes.string [] students = {"Tim", "Jack", "Henry", "David", "Tom"}; LinkedList list = new LinkedList(students);Now, use the AddLast() method to add a node at the last position.list.AddLast("Kevin");Here is the complete code with the updated LinkedList.Example Live Demousing System; using System.Collections.Generic; class Demo {    static void Main() { ... Read More

Difference between TimeSpan Seconds() and TotalSeconds()

karthikeya Boyini

karthikeya Boyini

Updated on 23-Jun-2020 07:36:57

4K+ Views

TimeSpan Seconds() is part of time, whereas TimeSpan TotalSeconds() converts entire time to seconds.Let us first see the TimeSpan Seconds() method.Example Live Demousing System; using System.Linq; public class Demo {    public static void Main() {       TimeSpan ts = new TimeSpan(0, 100, 0, 20, 0);       ... Read More

Advertisements