AmitDiwan has Published 10740 Articles

Stack.Clone() Method in C#

AmitDiwan

AmitDiwan

Updated on 03-Dec-2019 07:26:50

282 Views

The Stack.Clone() method in C# is used to create a shallow copy of the Stack.SyntaxThe syntax is as follows −public virtual object Clone ();ExampleLet us now see an example − Live Demousing System; using System.Collections; public class Demo {    public static void Main(){       Stack stack = new ... Read More

Queue.Equals() Method in C#

AmitDiwan

AmitDiwan

Updated on 03-Dec-2019 07:23:13

187 Views

The Queue.Equals() method in C# is used to check if a queue object is equal to another queue object.SyntaxThe syntax is as follows −public virtual bool Equals (object obj);Above, the parameter obj is for comparison.ExampleLet us now see an example − Live Demousing System; using System.Collections.Generic; public class Demo {   ... Read More

Queue.Enqueue() Method in C#

AmitDiwan

AmitDiwan

Updated on 03-Dec-2019 07:20:04

424 Views

The Queue.Enqueue() method in C# is used to add an object to the end of the Queue.SyntaxThe syntax is as follows −public virtual void Enqueue (object ob);Above, the parameter ob is the object to add to the Queue.ExampleLet us now see an example − Live Demousing System; using System.Collections.Generic; public class ... Read More

SortedDictionary.ContainsValue() Method in C#

AmitDiwan

AmitDiwan

Updated on 03-Dec-2019 07:16:27

108 Views

The SortedDictionary.ContainsValue() method in C# is used to determine whether the SortedDictionary contains an element with the specified value.SyntaxThe syntax is as follows −public bool ContainsValue (TValue val);Above, the value val is the value to be searched in the SortedDictionary.ExampleLet us now see an example − Live Demousing System; using System.Collections; ... Read More

TimeSpan.Compare() Method in C#

AmitDiwan

AmitDiwan

Updated on 03-Dec-2019 07:11:57

2K+ Views

The TimeSpan.Compare() method in C# is used to compare two TimeSpan values and returns an integer that indicates whether the first value is shorter than, equal to, or longer than the second value.The return value is -1 if span1 is shorter than span2, 0 if span1=span2, whereas 1 if span1 ... Read More

TimeSpan.Add() Method in C#

AmitDiwan

AmitDiwan

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

1K+ Views

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

Double.IsInfinity() Method in C#

AmitDiwan

AmitDiwan

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

128 Views

The Double.IsInfinity() method in C# is used to return a value indicating whether the specified number evaluates to negative or positive infinity.SyntaxThe syntax is as follows −public static bool IsInfinity (double d);Above, the value d is a double-precision floating-point number.ExampleLet us now see an example − Live Demousing System; public class ... Read More

SortedDictionary.Clear() Method in C#

AmitDiwan

AmitDiwan

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

118 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

190 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

Advertisements