AmitDiwan has Published 10740 Articles

Stack.ToString() Method in C# with examples

AmitDiwan

AmitDiwan

Updated on 04-Dec-2019 12:43:14

1K+ Views

The Stack.ToString() method in C# is used to get the string representation of the Stack class object.SyntaxThe syntax is as follows −public string ToString ();ExampleLet us now see an example − Live Demousing System; using System.Collections; public class Demo {    public static void Main() {       Stack stack ... Read More

Stack.ToArray() Method in C#

AmitDiwan

AmitDiwan

Updated on 04-Dec-2019 12:38:36

318 Views

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

Stack.Synchronized() Method in C#

AmitDiwan

AmitDiwan

Updated on 04-Dec-2019 12:33:33

126 Views

The Stack.Synchronized() method in C# is used to returns a synchronized (thread safe) wrapper for the Stack.SyntaxThe syntax is as follows −public static System.Collections.Stack Synchronized (System.Collections.Stack stack);Above, the parameter stack is the stack to synchronize.ExampleLet us now see an example − Live Demousing System; using System.Collections; public class Demo {   ... Read More

Single.IsNaN() Method in C# with Examples

AmitDiwan

AmitDiwan

Updated on 04-Dec-2019 12:28:12

206 Views

The Single.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 (float f);Above, the parameter val is a single-precision floating-point number.ExampleLet us now see an example − Live Demousing System; public class ... Read More

Stack.Clear() Method in C#

AmitDiwan

AmitDiwan

Updated on 04-Dec-2019 12:24:23

267 Views

The Stack.Clear() method in C# is used to removes all objects from the Stack.SyntaxThe syntax is as follows −public virtual void Clear ();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.Peek Method in C#

AmitDiwan

AmitDiwan

Updated on 04-Dec-2019 12:14:03

427 Views

The Queue.Peek() method in C# is used to return the object at the beginning of the Queue without removing it.SyntaxThe syntax is as follows −public virtual object Peek ();ExampleLet us now see an example − Live Demousing System; using System.Collections; public class Demo {    public static void Main() {   ... Read More

Queue.IsSynchronized Property in C#

AmitDiwan

AmitDiwan

Updated on 04-Dec-2019 12:09:31

128 Views

The Queue.IsSynchronized() method in C# is used to GET a value indicating whether access to the Queue is synchronized (thread safe).SyntaxThe syntax is as follows −public virtual bool IsSynchronized { get; }ExampleLet us now see an example − Live Demousing System; using System.Collections; public class Demo {    public static void ... Read More

Single.GetHashCode() Method in C# with Examples

AmitDiwan

AmitDiwan

Updated on 04-Dec-2019 12:05:07

240 Views

The Single.GetHashCode() method in C# is used to return the hash code for this instance.SyntaxThe syntax is as follows −public override int GetHashCode ();ExampleLet us now see an example − Live Demousing System; public class Demo {    public static void Main() {       float f1 = 40.2f;   ... Read More

SByte.GetHashCode() Method in C# with Examples

AmitDiwan

AmitDiwan

Updated on 04-Dec-2019 12:02:32

96 Views

The SByte.GetHashCode() method in C# is used to return the hash code for this instance.SyntaxThe syntax is as follows −public override int GetHashCode ();ExampleLet us now see an example − Live Demousing System; public class Demo {    public static void Main() {       sbyte s1 = 50;   ... Read More

SByte.GetTypeCode Method in C# with Examples

AmitDiwan

AmitDiwan

Updated on 04-Dec-2019 11:58:44

96 Views

The SByte.GetTypeCode() method in C# is used to return the TypeCode for value type SByte.SyntaxThe syntax is as follows −public TypeCode GetTypeCode ();ExampleLet us now see an example − Live Demousing System; public class Demo {    public static void Main() {       sbyte s1 = 55;     ... Read More

Advertisements