AmitDiwan has Published 11365 Articles

Type.GetMember() Method in C#

AmitDiwan

AmitDiwan

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

126 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

6K+ 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

1K+ 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

34 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

600 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

205 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

848 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

151 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

Adding dash between spaces in field name in MySQL?

AmitDiwan

AmitDiwan

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

346 Views

You can use REPLACE() for this. Let us first create a table −mysql> create table DemoTable1625     -> (     -> FullName varchar(20)     -> ); Query OK, 0 rows affected (0.68 sec)Insert some records in the table using insert command −mysql> insert into DemoTable1625 values('John Doe'); ... Read More

Math.Round() Method in C#

AmitDiwan

AmitDiwan

Updated on 08-Nov-2019 11:16:22

8K+ Views

The Math.Round() method in C# rounds a value to the nearest integer or to the specified number of fractional digits.MethodsThe following are the methods overloaded by Math.Round() −Math.Round(Double) Math.Round(Double, Int32) Math.Round(Double, Int32, MidpointRounding) Math.Round(Double, MidpointRounding) Math.Round(Decimal) Math.Round(Decimal, Int32) Math.Round(Decimal, Int32, MidpointRounding) Math.Round(Decimal, MidpointRounding)ExampleLet us now see an example to implement ... Read More

Advertisements