AmitDiwan has Published 10744 Articles

Queue.Clear Method in C#

AmitDiwan

AmitDiwan

Updated on 03-Dec-2019 13:01:58

228 Views

The Queue.Clear() method in C# is used to clear all object from Queue.SyntaxThe syntax is as follows -public virtual void Clear ();ExampleLet us now see an example - Live Demousing System; using System.Collections.Generic; public class Demo {    public static void Main() {       Queue queue = new Queue(); ... Read More

Double.IsPositiveInfinity() Method in C#

AmitDiwan

AmitDiwan

Updated on 03-Dec-2019 12:57:10

192 Views

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

StringBuilder.Chars[] Property in C#

AmitDiwan

AmitDiwan

Updated on 03-Dec-2019 12:49:09

116 Views

The StringBuilder.Chars[] property gets or sets the character at the specified character position in this instance.SyntaxThe syntax is as follows -public char this[int index] { get; set; }Above, the index parameter is the position of the character.ExampleLet us now see an example - Live Demousing System; using System.Text; public class Demo ... Read More

Thread.CurrentThread Property in C#

AmitDiwan

AmitDiwan

Updated on 03-Dec-2019 12:45:33

271 Views

The Thread.CurrentThread propertyin C# is used to get the currently running thread.SyntaxThe syntax is as follows -public static System.Threading.Thread CurrentThread { get; }ExampleLet us now see an example - Live Demousing System; using System.Threading; public class Demo {    public static void Main() {       Thread thread = new ... Read More

C# String Properties

AmitDiwan

AmitDiwan

Updated on 03-Dec-2019 12:40:51

865 Views

Following are the properties of the String class in C# −Sr.NoProperty & Description1CharsGets the Char object at a specified position in the current String object.2LengthGets the number of characters in the current String object.ExampleLet us see an example - Live Demousing System; public class Demo {    public static void Main() ... Read More

C# String.ToUpperInvariant Method

AmitDiwan

AmitDiwan

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

1K+ Views

The String.ToUpperInvariant() method in C# is used to return a copy of this String object converted to uppercase using the casing rules of the invariant culture.SyntaxThe syntax is as follows -public string ToUpperInvariant ();ExampleLet us now see an example - Live Demousing System; using System.Text; public class Demo {    public ... Read More

C# String.ToLowerInvariant Method

AmitDiwan

AmitDiwan

Updated on 03-Dec-2019 12:18:20

1K+ Views

The String.ToLowerInvariant() method in C# is used to return a copy of this String object converted to lowercase using the casing rules of the invariant culture.SyntaxThe syntax is as follows -public string ToLowerInvariant ();ExampleLet us now see an example - Live Demousing System; using System.Text; public class Demo {    public ... Read More

TimeSpan.FromTicks() Method in C#

AmitDiwan

AmitDiwan

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

368 Views

The TimeSpan.FromTicks() method in C# is used to return a TimeSpan that represents a specified time, where the specification is in units of ticks.SyntaxThe syntax is as follows -public static TimeSpan FromTicks (long val);Above, the parameter val is the number of ticks that represent a time.ExampleLet us now see an ... Read More

C# Object.GetHashCode() Method with Examples

AmitDiwan

AmitDiwan

Updated on 03-Dec-2019 12:10:56

1K+ Views

The Object.GetHashCode() method in C# is used to serve as the default hash function.Syntaxpublic virtual int GetHashCode ();ExampleLet us now see an example - Live Demousing System; public class Demo {    public static void Main() {       Object ob = new Object();       String str = ... Read More

C# IsNullOrWhiteSpace() Method

AmitDiwan

AmitDiwan

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

304 Views

The IsNullOrWhiteSpace() method in C# is used to indicate whether a specified string is null, empty, or consists only of white-space characters.Syntaxpublic static bool IsNullOrWhiteSpace (string val);Above, the parameter val is the string to test. Let us now see an example −ExampleLet us now see an example: Live Demousing System; public ... Read More

Advertisements