AmitDiwan has Published 10744 Articles

UInt16.GetHashCode() Method in C# with Examples

AmitDiwan

AmitDiwan

Updated on 05-Nov-2019 07:59:29

109 Views

The UInt16.GetHashCode() method in C# is used to get the HashCode for the current UInt16 instance.SyntaxFollowing is the syntax −public override int GetHashCode ();ExampleLet us now see an example to implement the UInt16.GetHashCode() method −using System; public class Demo {    public static void Main(){       ushort val1 ... Read More

Tuple Class in C#

AmitDiwan

AmitDiwan

Updated on 05-Nov-2019 07:57:04

142 Views

The Tuple class represents a 2-tuple, which is called pair. 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

UInt16.Equals Method in C# with Examples

AmitDiwan

AmitDiwan

Updated on 05-Nov-2019 07:54:23

131 Views

The UInt16.Equals() method in C# returns a value indicating whether this instance is equal to a specified object or UInt16.SyntaxFollowing is the syntax −public override bool Equals (object ob); public bool Equals (ushort ob);Above, the parameter ob for the 1st syntax is an object to compare to this instance and ... Read More

UInt16.CompareTo() Method in C# with Examples

AmitDiwan

AmitDiwan

Updated on 05-Nov-2019 07:50:34

185 Views

The UInt16.CompareTo() method in C# is used to compare the current instance to a specified object or UInt16 and returns an indication of their relative values.SyntaxFollowing is the syntax −public int CompareTo (object val); public int CompareTo (ushort val;Above, the value for the 1st syntax is an object to compare. ... Read More

MathF.Truncate() Method in C# with Examples

AmitDiwan

AmitDiwan

Updated on 05-Nov-2019 07:47:44

380 Views

The MathF.Truncate() method in C# is used to calculate an integral part of a specified single number or single-precision floating-point number.SyntaxFollowing is the syntax −public static float Truncate (float val);Above, Val is the specified number to be truncatedExampleLet us now see an example to implement the MathF.Truncate() method −using System; ... Read More

MySQL query to select rows where column value is only 0, group by another column?

AmitDiwan

AmitDiwan

Updated on 05-Nov-2019 07:47:33

288 Views

For this, use group by. Let us first create a table −mysql> create table DemoTable1344    -> (    -> `SequenceId` int NOT NULL AUTO_INCREMENT PRIMARY KEY,    -> ClientId int,    -> isMarried tinyint(1)    -> ); Query OK, 0 rows affected (0.49 sec)Insert some records in the table ... Read More

MathF.Tanh() Method in C# with Examples

AmitDiwan

AmitDiwan

Updated on 05-Nov-2019 07:44:22

130 Views

The MathF.Tanh() method in C# returns the hyperbolic tangent of a given single value argument.SyntaxFollowing is the syntax −public static float Tanh (float val);Above, Val is the is number whose hyperbolic tangent is to be returned.ExampleLet us now see an example to implement the MathF.Tanh() method −using System; public class ... Read More

Insert all the values in a table with a single MySQL query separating records by comma

AmitDiwan

AmitDiwan

Updated on 05-Nov-2019 07:42:58

262 Views

Let us first create a table −mysql> create table if not exists DemoTable1343    -> (    -> `_ClientId` int NOT NULL AUTO_INCREMENT PRIMARY KEY,    -> ClientName varchar(40),    -> ClientProjectDeadline date    -> )ENGINE=MyISAM, AUTO_INCREMENT=1000; Query OK, 0 rows affected (0.21 sec)Insert some records in the table using ... Read More

MathF.Tan() Method in C# with Examples

AmitDiwan

AmitDiwan

Updated on 05-Nov-2019 07:42:02

161 Views

The MathF.Tan() method in C# is used to return the tangent of a given float value argument.SyntaxFollowing is the syntax −public static float Tan (float val);Above, Val is the angle whose tangent is to be returned.ExampleLet us now see an example to implement the MathF.Tan() method −using System; public class ... Read More

Convert.ToBase64String() Method in C#

AmitDiwan

AmitDiwan

Updated on 05-Nov-2019 07:37:58

1K+ Views

The Convert.ToBase64String() method in C# is used to convert the value of an array of 8-bit unsigned integers to its equivalent string representation that is encoded with base-64 digits.SyntaxFollowing is the syntax −public static string ToBase64String (byte[] arr);Above, arr is an array of 8-bit unsigned integers.ExampleLet us now see an ... Read More

Advertisements