AmitDiwan has Published 10740 Articles

UInt64.CompareTo() Method in C# with Examples

AmitDiwan

AmitDiwan

Updated on 07-Nov-2019 06:46:28

201 Views

The UInt64.CompareTo() method in C# is used to compare the current instance to a specified object or UInt64 and returns an indication of their relative values.SyntaxFollowing is the syntax −public int CompareTo (object val); public int CompareTo (ulong val;Above, the value for the 1st syntax is an object to compare. ... Read More

Int32.GetTypeCode Method in C# with Examples

AmitDiwan

AmitDiwan

Updated on 07-Nov-2019 06:43:30

147 Views

The Int32.GetTypeCode() method in C# is used to return the TypeCode for value type Int32.SyntaxFollowing is the syntax −public TypeCode GetTypeCode ();ExampleLet us now see an example to implement the Int32.GetTypeCode() method −using System; public class Demo {    public static void Main(){       int val1 = 100; ... Read More

Decimal.Truncate() Method in C#

AmitDiwan

AmitDiwan

Updated on 07-Nov-2019 06:40:45

1K+ Views

The Decimal.Truncate() method in C# is used to return the integral digits of the specified Decimal. Remember, any fractional digits are discarded.SyntaxFollowing is the syntax −public static decimal Truncate (decimal val);Above, Val is the decimal number to truncate.ExampleLet us now see an example to implement the Decimal.Truncate() method −using System; ... Read More

Decimal.ToUInt64() Method in C#

AmitDiwan

AmitDiwan

Updated on 07-Nov-2019 06:38:41

60 Views

The Decimal.ToUInt64() method in C# is used to convert the value of the specified Decimal to the equivalent 64-bit unsigned integer.SyntaxFollowing is the syntax −public static ulong ToUInt64 (decimal val);Above, Val is the decimal number to convert.ExampleLet us now see an example to implement the Decimal.ToUInt64() method −using System; public ... Read More

Decimal.ToUInt32() Method in C#

AmitDiwan

AmitDiwan

Updated on 07-Nov-2019 06:33:27

91 Views

The Decimal.ToUInt32() method in C# is used to convert the value of the specified Decimal to the equivalent 32-bit unsigned integer.SyntaxFollowing is the syntax −public static uint ToUInt32 (decimal val);Above, Val is the decimal number to convert.ExampleLet us now see an example to implement the Decimal.ToUInt32() method −using System; public ... Read More

BitConverter.Int64BitsToDouble() Method in C#

AmitDiwan

AmitDiwan

Updated on 07-Nov-2019 06:31:18

107 Views

The BitConverter.Int64BitsToDouble() method in C# is used to reinterpret the specified 64-bit signed integer to a double-precision floating-point number.SyntaxFollowing is the syntax −public static double Int64BitsToDouble (long val);Above, the parameter value is the number to convert.ExampleLet us now see an example to implement the BitConverter.Int64BitsToDouble() method −using System; public class ... Read More

BitConverter.DoubleToInt64Bits() Method in C#

AmitDiwan

AmitDiwan

Updated on 07-Nov-2019 06:29:06

109 Views

The BitConverter.DoubleToInt64Bits() method in C# is used to convert the specified double-precision floating-point number to a 64-bit signed integer.SyntaxFollowing is the syntax −public static long DoubleToInt64Bits (double val);Above, Val is the number to convert.ExampleLet us now see an example to implement the BitConverter.DoubleToInt64Bits() method −using System; public class Demo { ... Read More

Array.LastIndexOf(T[], T) Method in C#

AmitDiwan

AmitDiwan

Updated on 07-Nov-2019 06:14:01

219 Views

The Array.LastIndexOf() method in C# is used to search for the specified object and returns the index of the last occurrence within the entire Array.SyntaxFollowing is the syntax −public static int LastIndexOf (T[] array, T val);Above, the parameter arr is the one-dimensional, zero-based Array to search, whereas Val is the ... Read More

Array.GetEnumerator Method in C#

AmitDiwan

AmitDiwan

Updated on 07-Nov-2019 06:10:28

248 Views

The Array.GetEnumerator() method in C# is used to return an IEnumerator for the Array.SyntaxFollowing is the syntax −public virtual System.Collections.IEnumerator GetEnumerator ();ExampleLet us now see an example to implement the Array.GetEnumerator() method −using System; using System.Collections; public class Demo{    public static void Main(){       int j = ... Read More

Array.FindLast() Method in C#

AmitDiwan

AmitDiwan

Updated on 07-Nov-2019 06:07:48

540 Views

The Array.FindLast() method in C# is used to search for an element that matches the conditions defined by the specified predicate, and returns the last occurrence within the entire Array.SyntaxFollowing is the syntax −public static T FindLast (T[] array, Predicate match);Above, array is the one-dimensional, zero-based Array to search, whereas ... Read More

Advertisements