AmitDiwan has Published 10744 Articles

Int32.GetHashCode Method in C# with Examples

AmitDiwan

AmitDiwan

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

194 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

243 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

230 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

84 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

457 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

Boolean.ToString() Method in C#

AmitDiwan

AmitDiwan

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

7K+ Views

The Boolean.ToString() method in C# converts the value of this instance to its equivalent string representation (either "True" or "False").SyntaxFollowing is the syntax −public override string ToString ();ExampleLet us now see an example to implement the Boolean.ToString() method −using System; public class Demo {    public static void Main(){   ... Read More

Boolean.Equals(Object) Method in C#

AmitDiwan

AmitDiwan

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

169 Views

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

Boolean.Equals(Boolean) Method in C#

AmitDiwan

AmitDiwan

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

465 Views

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

DateTimeOffset.AddMilliseconds() Method in C#

AmitDiwan

AmitDiwan

Updated on 11-Nov-2019 07:21:58

97 Views

The DateTimeOffset.AddMilliseconds() method in C# is used to return a new DateTimeOffset object that adds a specified number of milliseconds to the value of this instance.SyntaxFollowing is the syntax −public DateTimeOffset AddMilliseconds (double val);Above, Val are the milliseconds to be added. To subtract, set a negative value.ExampleLet us now see ... Read More

DateTimeOffset.AddHours() Method in C#

AmitDiwan

AmitDiwan

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

284 Views

The DateTimeOffset.AddHours() method in C# is used to add a specified number of whole and fractional hours to the value of this instance.SyntaxFollowing is the syntax −public DateTimeOffset AddHours (double hrs);Above, hrs are the hours to be added. To subtract hours, include a negative value.ExampleLet us now see an example ... Read More

Advertisements