AmitDiwan has Published 11365 Articles

UInt64.CompareTo() Method in C# with Examples

AmitDiwan

AmitDiwan

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

111 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

62 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

926 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

22 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

34 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

47 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

44 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.TrueForAll() Method in C#

AmitDiwan

AmitDiwan

Updated on 07-Nov-2019 06:23:56

241 Views

The Array.TrueForAll() method in C# is used to determine whether every element in the array matches the conditions defined by the specified predicate.SyntaxFollowing is the syntax −public static bool TrueForAll (T[] array, Predicate match);ExampleLet us now see an example to implement the Array.TrueForAll() 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

108 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

178 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

Advertisements