AmitDiwan has Published 11365 Articles

Byte.CompareTo(Byte) Method in C#

AmitDiwan

AmitDiwan

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

73 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

1K+ 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

706 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

294 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

830 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

149 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

157 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

152 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

Type.GetTypeArray() Method in C#

AmitDiwan

AmitDiwan

Updated on 11-Nov-2019 07:31:22

22 Views

The Type.GetTypeArray() method in C# is used to get the types of the objects in the specified array.SyntaxFollowing is the syntax −public static Type[] GetTypeArray (object[] args);The arg argument is an array of objects whose types to determine.ExampleLet us now see an example to implement the Type.GetTypeArray() method −using System; ... Read More

Type.GetProperties() Method in C#

AmitDiwan

AmitDiwan

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

294 Views

The Type.GetProperties() method in C# is used to get the properties of the current Type.SyntaxFollowing is the syntax −public System.Reflection.PropertyInfo[] GetProperties (); public abstract System.Reflection.PropertyInfo[] GetProperties (System.Reflection.BindingFlags bindingAttr);Above, bindingAttr is a bitwise combination of the enumeration values that specify how the search is performed.Exampleusing System; using System.Reflection; public class Demo ... Read More

Advertisements