AmitDiwan has Published 10744 Articles

DateTime.AddTicks() Method in C#

AmitDiwan

AmitDiwan

Updated on 11-Nov-2019 06:38:36

859 Views

The DateTime.AddTicks() method in C# is used to add a specified number of ticks to the value of this instance. It returns a new DateTime.SyntaxFollowing is the syntax −public DateTime AddTicks (long ticks);Here, ticks value is for 100-nanosecond.ExampleLet us now see an example to implement the DateTime.AddTicks() method −using System; ... Read More

DateTime.AddSeconds() Method in C#

AmitDiwan

AmitDiwan

Updated on 11-Nov-2019 05:58:09

3K+ Views

The DateTime.AddSeconds() method in C# is used to add the specified number of seconds to the value of this instance. This returns a new DateTime.SyntaxFollowing is the syntax −public DateTime AddSeconds (double sec);Here, sec is the seconds to be added. If you want to subtract seconds, then set a negative ... Read More

DateTime.AddMonths() Method in C#

AmitDiwan

AmitDiwan

Updated on 11-Nov-2019 05:56:20

5K+ Views

The DateTime.AddMonths() method in C# is used to add the specified number of months to the value of this instance.SyntaxFollowing is the syntax −public DateTime AddMonths (int val);Above, Val is the number of months. If you want to subtract months, then set it as negative.ExampleLet us now see an example ... Read More

Decimal.Compare() Method in C#

AmitDiwan

AmitDiwan

Updated on 11-Nov-2019 05:51:42

891 Views

The Decimal.Compare() method in C# is used to compare two specified Decimal values.SyntaxFollowing is the syntax −public static int Compare (decimal val1, decimal val2);Above, val1 is the first value to compare, whereas Val is the second value to compare.The return value is less than zero if val1 is less than ... Read More

Type.GetMembers() Method in C#

AmitDiwan

AmitDiwan

Updated on 11-Nov-2019 05:50:04

209 Views

The Type.GetMembers() method in C# is used to get the members (properties, methods, fields, events, etc.) of the current Type.SyntaxFollowing is the syntax −public System.Reflection.MemberInfo[] GetMembers (); public abstract System.Reflection.MemberInfo[] GetMembers (System.Reflection.BindingFlags bindingAttr);ExampleLet us now see an example to implement the Type.GetMembers() method −using System; using System.Reflection; public class Demo ... Read More

Type.GetMember() Method in C#

AmitDiwan

AmitDiwan

Updated on 11-Nov-2019 05:47:30

218 Views

The Type.GetMember() method in C# is used to get the specified members of the current Type.SyntaxFollowing is the syntax −public System.Reflection.MemberInfo[] GetMember (string name); public virtual System.Reflection.MemberInfo[] GetMember (string name, System.Reflection.BindingFlags bindingAttr);ExampleLet us now see an example to implement the Type.GetMember() method −using System; using System.Reflection; public class Demo { ... Read More

DateTime.AddMinutes() Method in C#

AmitDiwan

AmitDiwan

Updated on 11-Nov-2019 05:43:56

7K+ Views

The DateTime.AddMinutes() method in C# is used to add the specified number of minutes to the value of this instance. It returns the new DateTime.SyntaxFollowing is the syntax −public DateTime AddMinutes (double m);Above, m are the minutes to be added. If a negative value is added, then the minutes will ... Read More

DateTime.AddMilliseconds() Method in C#

AmitDiwan

AmitDiwan

Updated on 11-Nov-2019 05:42:03

2K+ Views

The DateTime.AddMilliseconds() method in C# is used to adds the specified number of milliseconds to the value of this instance. This method returns a new DateTime.SyntaxFollowing is the syntax −public DateTime AddMilliseconds (double mSec);Above, mSec is the milliseconds to be added.ExampleLet us now see an example to implement the DateTime.AddMilliseconds() ... Read More

Math.Sinh() Method in C#

AmitDiwan

AmitDiwan

Updated on 11-Nov-2019 05:40:28

75 Views

The Math.Sinh() method in C# is used to return the hyperbolic sine of a specified angle.SyntaxFollowing is the syntax −public static double Sinh(double val)Above, the argument value is the angle.ExampleLet us now see an example to implement the Math.Sinh() method −using System; public class Demo {    public static void ... Read More

Math.Sin() Method in C#

AmitDiwan

AmitDiwan

Updated on 08-Nov-2019 11:21:08

722 Views

The Math.Sin() method in C# is used to return the sine of a specified angle.SyntaxFollowing is the syntax −public static double Sin (double val);Above, the argument value is an angle.ExampleLet us now see an example to implement Math.Sin() method −using System; public class Demo {    public static void Main(){ ... Read More

Advertisements