AmitDiwan has Published 10744 Articles

SortedDictionary.Clear() Method in C#

AmitDiwan

AmitDiwan

Updated on 03-Dec-2019 07:03:31

103 Views

The SortedDictionary.Clear() method in C# is used to remove all elements from the SortedDictionary.SyntaxThe syntax is as follows −public void Clear ();ExampleLet us now see an example − Live Demousing System; using System.Collections; using System.Collections.Generic; public class Demo {    public static void Main(){       SortedDictionary sortedDict = new ... Read More

C# SortedDictionary.Add() Method

AmitDiwan

AmitDiwan

Updated on 03-Dec-2019 07:00:08

157 Views

The SortedDictionary.Add() method in C# is used to add an element with the specified key and value into the SortedDictionary.SyntaxThe syntax is as follows −public void Add (TKey key, TValue val);Above, the value key is the key of the element to add, whereas val is the value of the element ... Read More

TimeSpan.Subtract() Method in C#

AmitDiwan

AmitDiwan

Updated on 03-Dec-2019 06:56:42

1K+ Views

The TimeSpan.Subtract() method in C# is used to return a new TimeSpan object whose value is the difference between the specified TimeSpan object and this instance.SyntaxThe syntax is as follows −public TimeSpan Subtract (TimeSpan span);Above, the parameter span is the time interval to be subtracted.ExampleLet us now see an example ... Read More

TimeSpan.FromHours() Method in C#

AmitDiwan

AmitDiwan

Updated on 03-Dec-2019 06:51:14

1K+ Views

The TimeSpan.FromHours() method in C# is used to return a TimeSpan that represents a specified number of hours, where the specification is accurate to the nearest millisecond.SyntaxThe syntax is as follows −public static TimeSpan FromHours (double val);Above, the value val is a number of hours accurate to the nearest millisecond.ExampleLet ... Read More

Stack.GetEnumerator() Method in C#

AmitDiwan

AmitDiwan

Updated on 03-Dec-2019 06:47:25

115 Views

The Stack.GetEnumerator() method in C# is used to return an IEnumerator for the Stack.SyntaxThe syntax is as follows −public virtual System.Collections.IEnumerator GetEnumerator ();ExampleLet us now see an example − Live Demousing System; using System.Collections; public class Demo {    public static void Main(){       Stack stack1 = new Stack(); ... Read More

Stack.Equals() Method in C#

AmitDiwan

AmitDiwan

Updated on 03-Dec-2019 06:44:07

320 Views

The Stack.Equals() method in C# is used to check whether a Stack class object is equal to another object or not.SyntaxThe syntax is as follows −public virtual bool Equals (object ob);Above, the parameter ob is the object compared with another.ExampleLet us now see an example − Live Demousing System; using System.Collections; ... Read More

Double.IsNaN() Method in C#

AmitDiwan

AmitDiwan

Updated on 03-Dec-2019 06:39:35

700 Views

The Double.IsNaN() method in C# is used to return a value that indicates whether the specified value is not a number (NaN).SyntaxThe syntax is as follows −public static bool IsNaN (double val);Above, val is the double-precision floating-point number.ExampleLet us now see an example − Live Demousing System; public class Demo { ... Read More

TimeSpan.FromDays() Method in C#

AmitDiwan

AmitDiwan

Updated on 03-Dec-2019 06:36:56

687 Views

The TimeSpan.FromDays() method in C# is used to return a TimeSpan that represents a specified number of days, where the specification is accurate to the nearest millisecond.SyntaxThe syntax is as follows −public static TimeSpan FromDays (double val);Above, the parameter val is the number of days, accurate to the nearest millisecond.ExampleLet ... Read More

C# BitConverter.ToUInt64 Method

AmitDiwan

AmitDiwan

Updated on 02-Dec-2019 12:41:46

264 Views

The BitConverter.ToUInt64() method in C# is used to return a 64-bit unsigned integer converted from eight bytes at a specified position in a byte array.Syntaxpublic static ulong ToUInt64 (byte[] val, int begnIndex);ExampleAbove, val is the byte array, whereas begnIndex is the beginning position within val. Live Demousing System; public class Demo ... Read More

C# BitConverter.ToUInt32() Method

AmitDiwan

AmitDiwan

Updated on 02-Dec-2019 12:36:05

363 Views

The BitConverter.ToUInt32() method in C# is used to return a 32-bit unsigned integer converted from four bytes at a specified position in a byte array.Syntaxpublic static uint ToUInt32 (byte[] val, int begnIndex);Above, val is the byte array, whereas begnIndex is the starting position withing val.Example Live Demousing System; public class Demo ... Read More

Advertisements