AmitDiwan has Published 10740 Articles

Decimal.Compare() Method in C#

AmitDiwan

AmitDiwan

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

934 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

226 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

239 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

101 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

755 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

MySQL number-string formatting to pad zeros on the left of a string with numbers after a slash

AmitDiwan

AmitDiwan

Updated on 08-Nov-2019 11:20:41

327 Views

Let us first create a table −mysql> create table DemoTable1369     -> (     -> BatchId varchar(20)     -> ); Query OK, 0 rows affected (0.46 sec)Insert some records in the table using insert command. We have inserted numbers here separated by a slash −mysql> insert into ... Read More

Math.Sign() Method in C#

AmitDiwan

AmitDiwan

Updated on 08-Nov-2019 11:19:12

1K+ Views

The Math.Sign() method in C# is used to return an integer that indicates the sign of a number.MethodsThe Math.Sign() overloads the following methods −Math.Sign(Int16) Math.Sign(Int32) Math.Sign(Int64) Math.Sign(SByte) Math.Sign(Single) Math.Sign(Decimal) Math.Sign(Double)ExampleLet us now see an example to implement Math.Sign() method −using System; public class Demo {    public static void Main(){ ... Read More

MySQL query to append a number of stars based on string length?

AmitDiwan

AmitDiwan

Updated on 08-Nov-2019 11:17:51

265 Views

For this, you can use RPAD(). Let us first create a table −mysql> create table DemoTable1626     -> (     -> Name varchar(20)     -> ); Query OK, 0 rows affected (0.37 sec)Insert some records in the table using insert command −mysql> insert into DemoTable1626 values('Chris'); Query ... Read More

Advertisements