AmitDiwan has Published 10740 Articles

Byte.Equals(Byte) Method in C#

AmitDiwan

AmitDiwan

Updated on 11-Nov-2019 07:45:44

340 Views

The Byte.Equals(Byte) method in C# returns a value indicating whether this instance and a specified Byte object represent the same value.SyntaxFollowing is the syntax −public bool Equals (byte ob);Above, ob is an object to compare to this instance.ExampleLet us now see an example to implement the Byte.Equals(Byte) method −using System; ... Read More

Byte.CompareTo(Object) Method in C#

AmitDiwan

AmitDiwan

Updated on 11-Nov-2019 07:44:41

126 Views

The Byte.CompareTo(Object) method in C# is used to compare this instance to a specified object and returns an indication of their relative values.SyntaxFollowing is the syntax −public int CompareTo (object val);Above, Val is an object to compare or null.The return value is less than zero if the current instance is ... Read More

Byte.CompareTo(Byte) Method in C#

AmitDiwan

AmitDiwan

Updated on 11-Nov-2019 07:43:25

165 Views

The Byte.CompareTo(Byte) method in C# is used to compare this instance to a specified 8-bit unsigned integer and returns an indication of their relative values.SyntaxFollowing is the syntax −public int CompareTo (byte val);Above, the parameter value is an 8-bit unsigned integer to compare.The return value is less than zero if ... Read More

Boolean.TryParse() Method in C#

AmitDiwan

AmitDiwan

Updated on 11-Nov-2019 07:41:53

2K+ Views

The Boolean.TryParse() method in C# is used to convert the specified string representation of a logical value to its Boolean equivalent.SyntaxFollowing is the syntax −public static bool TryParse (string val out bool result);ExampleLet us now see an example to implement the Boolean.TryParse() method −using System; public class Demo {   ... Read More

DateTime.ToUniversalTime() Method in C#

AmitDiwan

AmitDiwan

Updated on 11-Nov-2019 07:40:39

1K+ Views

The DateTime.ToUniversalTime() method in C# is used to convert the value of the current DateTime object to Coordinated Universal Time (UTC).SyntaxFollowing is the syntax −public DateTime ToUniversalTime ();ExampleLet us now see an example to implement the DateTime.ToUniversalTime() method −using System; public class Demo {    public static void Main() { ... Read More

DateTime.ToString() Method in C#

AmitDiwan

AmitDiwan

Updated on 11-Nov-2019 07:39:23

492 Views

The DateTime.ToString() method in C# is used to convert the value of the current DateTime object to its equivalent string representation.SyntaxFollowing is the syntax −ToString(String, IFormatProvider) ToString() ToString(IFormatProvider) ToString(String)ExampleLet us now see an example to implement the DateTime.ToString() method −using System; public class Demo {    public static void Main() ... Read More

DateTime.ToShortTimeString() Method in C#

AmitDiwan

AmitDiwan

Updated on 11-Nov-2019 07:38:13

1K+ Views

The DateTime.ToShortTimeString() method in C# is used to convert the value of the current DateTime object to its equivalent short time string representation.SyntaxFollowing is the syntax −public string ToShortTimeString ();ExampleLet us now see an example to implement the DateTime.ToShortTimeString() method −using System; using System.Globalization; public class Demo {    public ... Read More

Int32.GetHashCode Method in C# with Examples

AmitDiwan

AmitDiwan

Updated on 11-Nov-2019 07:36:46

207 Views

The Int32.GetHashCode() method in C# is used to return the hash code for the current instance.SyntaxFollowing is the syntax −public override int GetHashCode ();ExampleLet us now see an example to implement the Int32.GetHashCode() method −using System; public class Demo {    public static void Main(){       int val1 ... Read More

Int32. Equals Method in C# with Examples

AmitDiwan

AmitDiwan

Updated on 11-Nov-2019 07:35:26

267 Views

The Int32.Equals() method in C# is used to return a value indicating whether this instance is equal to a specified object or Int32.SyntaxFollowing is the syntax −public bool Equals (int ob); public override bool Equals (object ob);Above, the parameter ob in the 1st syntax is an Int32 value to compare ... Read More

Type.GetTypeCode() Method in C#

AmitDiwan

AmitDiwan

Updated on 11-Nov-2019 07:32:38

253 Views

The Type.GetTypeCode() method in C# is used to get the underlying type code of the specified Type.SyntaxFollowing is the syntax −public static TypeCode GetTypeCode (Type type);Above, the type parameter is the type whose underlying type code to get.ExampleLet us now see an example to implement the Type.GetTypeCode() method −using System; ... Read More

Advertisements