AmitDiwan has Published 10744 Articles

Math.Log() Method in C#

AmitDiwan

AmitDiwan

Updated on 04-Nov-2019 10:52:30

1K+ Views

The Math.Log() method in C# is used to return the logarithm of a specified number.Syntaxpublic static double Log(double num) public static double Log(double num, double base)Above, num is the specified number whose logarithm is to be calculated. Here, the base is the base of the logarithm.Let us now see an ... Read More

MySQL query to display records ordered by numeric difference?

AmitDiwan

AmitDiwan

Updated on 04-Nov-2019 10:46:31

82 Views

Use ORDER BY and set the difference to display records ordered by numeric difference. Following is the syntax −select *from yourTableName order by (yourIntegerColumnName1 - yourIntegerColumnName2);Let us first create a table −mysql> create table DemoTable1313 -> ( -> Name varchar(20), -> Score1 int, -> Score2 int -> ); Query OK, ... Read More

How to use a comma-separated string in an `IN ()` in MySQL?

AmitDiwan

AmitDiwan

Updated on 04-Nov-2019 10:46:30

2K+ Views

Set the comma-separated string in the IN() as in the below syntax:select *from yourTableName where yourColumnName IN('yourCommaSeparatedValue');Let us first create a table −mysql> create table DemoTable1314 -> ( -> Number varchar(100) -> ); Query OK, 0 rows affected (0.53 sec)Insert some records in the table using insert command −mysql> insert ... Read More

A single query to get the sum of count from different tables in MySQL?

AmitDiwan

AmitDiwan

Updated on 04-Nov-2019 10:42:49

3K+ Views

To get the sum of count from different tables, use UNION ALL. Let us first create a table −mysql> create table DemoTable1 -> ( -> Id int, -> Name varchar(30) -> ); Query OK, 0 rows affected (1.55 sec)Insert some records in the table using insert command −mysql> insert into ... Read More

Math.IEEERemainder() Method in C#

AmitDiwan

AmitDiwan

Updated on 04-Nov-2019 10:40:18

73 Views

The Math.IEEERemainder() method in C# is used to return the remainder resulting from the division of a specified number by another specified number.Syntaxpublic static double IEEERemainder (double dividend, double divisor);Let us now see an example to implement Math.IEEERemainder() method −Exampleusing System; public class Demo {    public static void Main(){ ... Read More

Type.GetDefaultMembers() Method in C#

AmitDiwan

AmitDiwan

Updated on 04-Nov-2019 10:37:17

91 Views

The Type.GetDefaultMembers() method in C# is used to search for the members defined for the current Type whose DefaultMemberAttribute is set.Syntaxpublic virtual System.Reflection.MemberInfo[] GetDefaultMembers ();Let us now see an example to implement the Type.GetDefaultMembers() method −Exampleusing System; using System.Reflection; [DefaultMemberAttribute("subject")] public class Demo {    public static void Main(){   ... Read More

Type.GetArrayRank() Method in C#

AmitDiwan

AmitDiwan

Updated on 04-Nov-2019 10:35:11

107 Views

The Type.GetArrayRank() method in C# gets the number of dimensions in an array.Syntaxpublic virtual int GetArrayRank ();Let us now see an example to implement the Type.GetArrayRank() method −Exampleusing System; public class Demo {    public static void Main(string[] args) {       Type type = typeof(int[, , ]);   ... Read More

Type.Equals() Method in C#

AmitDiwan

AmitDiwan

Updated on 04-Nov-2019 10:31:27

882 Views

The Type.Equals() method in C# determines if the underlying system type of the current Type is the same as the underlying system type of the specified Object or Type.Syntaxpublic virtual bool Equals (Type o); public override bool Equals (object o);Above, the parameters are the object whose underlying system type is ... Read More

Tuple Class in C#

AmitDiwan

AmitDiwan

Updated on 04-Nov-2019 10:29:26

129 Views

The Tuple class represents a 7-tuple, which is called septet. A tuple is a data structure that has a sequence of elements.It is used in −Easier access to a data set.Easier manipulation of a data set.To represent a single set of data.To return multiple values from a methodTo pass multiple ... Read More

Tuple Class in C#

AmitDiwan

AmitDiwan

Updated on 04-Nov-2019 10:26:19

133 Views

The Tuple class represents a 6-tuple. A tuple is a data structure that has sequence of elements.It is used in −Easier access to a data set.Easier manipulation of a data set.To represent a single set of data.To return multiple values from a methodTo pass multiple values to a methodIt has ... Read More

Advertisements