AmitDiwan has Published 10744 Articles

DateTime.AddYears() Method in C#

AmitDiwan

AmitDiwan

Updated on 06-Nov-2019 06:23:49

4K+ Views

The DateTime.AddYears() method in C# is used to add the specified number of years to the value of this instance. It returns new DateTime.SyntaxFollowing is the syntax −public DateTime AddYears (int yrs);Above, yrs are the years to be added. If you want to subtract years, then use a negative value.ExampleLet ... Read More

Math.Pow() Method in C#

AmitDiwan

AmitDiwan

Updated on 06-Nov-2019 06:21:59

5K+ Views

The Math.Pow() method in C# is used to compute a number raised to the power of some other number.SyntaxFollowing is the syntax −public static double Pow(double val1, double val2)Above, val1 is a double-precision floating-point number to be raised to a power., whereas val2 is a double-precision floating-point number that specifies ... Read More

Math.Min() Method in C#

AmitDiwan

AmitDiwan

Updated on 06-Nov-2019 06:20:08

3K+ Views

The Math.Min() method in C# is used to return the larger of two specified numbers. This method works for both the numbers being Double, Decimal, Int16, Int32, etc.SyntaxFollowing is the syntax −public static ulong Min (ulong val1, ulong val2); public static uint Min (uint val1, uint val2); public static ushort ... Read More

Char.ConvertFromUtf32(Int32) Method in C#

AmitDiwan

AmitDiwan

Updated on 06-Nov-2019 06:18:29

440 Views

The Char.ConvertFromUtf32(Int32) method in C# is used to converts the specified Unicode code point into a UTF-16 encoded string.SyntaxFollowing is the syntax −public static string ConvertFromUtf32 (int utf32);Above, the parameter utf32 is a 21-bit Unicode code point.ExampleLet us now see an example to implement the Char.ConvertFromUtf32(Int32) method −using System; public ... Read More

Convert.ToByte(String, IFormatProvider) Method in C#

AmitDiwan

AmitDiwan

Updated on 06-Nov-2019 06:16:45

539 Views

The Convert.ToByte() method in C# converts the specified string representation of a number to an equivalent 8-bit unsigned integer, using specified culture-specific formatting information.SyntaxFollowing is the syntax −public static byte ToByte (string val, IFormatProvider provider);Above, Val is a string that contains the number to convert. A parameter provider is an ... Read More

Math.Max() Method in C#

AmitDiwan

AmitDiwan

Updated on 06-Nov-2019 06:14:52

6K+ Views

The Math.Max() method in C# is used to return the larger of two specified numbers. This method works for both the numbers being Double, Decimal, Int16, Int32, etc.SyntaxFollowing is the syntax −public static ulong Max (ulong val1, ulong val2); public static uint Max (uint val1, uint val2); public static ushort ... Read More

How to create 4-Tuple or quadruple in C#?

AmitDiwan

AmitDiwan

Updated on 06-Nov-2019 06:12:24

228 Views

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

How to create 3-Tuple or Triple Tuple in C#?

AmitDiwan

AmitDiwan

Updated on 06-Nov-2019 06:08:33

411 Views

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

DateTimeOffset.Compare() Method in C#

AmitDiwan

AmitDiwan

Updated on 06-Nov-2019 06:05:41

3K+ Views

The DateTimeOffset.Compare() method in C# is used to compare two DateTimeOffset objects and indicates whether the first is earlier than the second, equal to the second, or later than the second. It returns an integer value, 0 − If val1 is later than val2SyntaxFollowing is the syntax −public static int ... Read More

DateTimeOffset.AddYears() Method in C#

AmitDiwan

AmitDiwan

Updated on 06-Nov-2019 06:02:41

66 Views

The DateTimeOffset.AddYears() method in C# is used to add a specified number of years to the value of this instance.SyntaxFollowing is the syntax −public DateTimeOffset AddYears (int val);Above, the Val parameter is the years to be added to the offset. To subtract, you need to set negative values.ExampleLet us now ... Read More

Advertisements