AmitDiwan has Published 10740 Articles

Decimal.Add() Method in C#

AmitDiwan

AmitDiwan

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

1K+ Views

The Decimal.Add() method in C# is used to add two specified Decimal values.SyntaxFollowing is the syntax −public static decimal Add (decimal val1, decimal val2);Above, va1 is the first decimal to add, whereas val2 is the second decimal to be added.ExampleLet us now see an example to implement the Decimal.Add() method ... Read More

DateTimeOffset.ToUnixTimeSeconds() Method in C#

AmitDiwan

AmitDiwan

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

615 Views

The DateTimeOffset.ToUnixTimeSeconds() method in C# is used to return the number of seconds that have elapsed since 1970-01-01T00:00:00Z.SyntaxFollowing is the syntax −public long ToUnixTimeSeconds ();ExampleLet us now see an example to implement the DateTimeOffset.ToUnixTimeSeconds() method −using System; public class Demo {    public static void Main() {       ... Read More

DateTimeOffset.ToUnixTimeMilliseconds() Method in C#

AmitDiwan

AmitDiwan

Updated on 12-Nov-2019 08:07:10

815 Views

The DateTimeOffset.ToUnixTimeMilliseconds() method in C# is used to return the number of milliseconds that have elapsed since 1970-01-01T00:00:00.000Z.SyntaxFollowing is the syntax −public long ToUnixTimeMilliseconds ();ExampleLet us now see an example to implement the DateTimeOffset.ToUnixTimeMilliseconds() method −using System; public class Demo {    public static void Main() {       ... Read More

DateTimeOffset.ToOffset() Method in C#

AmitDiwan

AmitDiwan

Updated on 12-Nov-2019 08:05:41

652 Views

The DateTimeOffset.ToOffset() method in C# is used to convert the value of the current DateTimeOffset object to the date and time specified by an offset value.SyntaxFollowing is the syntax −public DateTimeOffset ToOffset (TimeSpan val);Above, the value is the offset to convert the DateTimeOffset value to.ExampleLet us now see an example ... Read More

DateTimeOffset.ToLocalTime() Method in C#

AmitDiwan

AmitDiwan

Updated on 12-Nov-2019 08:03:43

145 Views

The DateTimeOffset.ToLocalTime() method in C# is used to convert the current DateTimeOffset object to a DateTimeOffset object that represents the local time.SyntaxFollowing is the syntax −public DateTimeOffset ToLocalTime ();ExampleLet us now see an example to implement the DateTimeOffset.ToLocalTime() method −using System; public class Demo {    public static void Main() ... Read More

DateTimeOffset.ToFileTime() Method in C#

AmitDiwan

AmitDiwan

Updated on 12-Nov-2019 08:01:37

119 Views

The DateTimeOffset.ToFileTime() method in C# is used to convert the value of the current DateTimeOffset object to a Windows file time. The method returns an Int64 value of the current DateTimeOffset object, expressed as a Windows file time.SyntaxFollowing is the syntax −public long ToFileTime ();ExampleLet us now see an example ... Read More

DateTimeOffset.GetHashCode() Method in C#

AmitDiwan

AmitDiwan

Updated on 12-Nov-2019 07:58:33

115 Views

The DateTimeOffset.GetHashCode method in C# is used to return the hash code for the current DateTimeOffset object. This method returns a 32-bit signed integer hash code.SyntaxFollowing is the syntax −public override int GetHashCode ();ExampleLet us now see an example to implement the DateTimeOffset.GetHashCode() method −using System; public class Demo { ... Read More

How to create 7-Tuple or Septuple in C#?

AmitDiwan

AmitDiwan

Updated on 12-Nov-2019 07:56:40

134 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

How to create 6-Tuple in C#?

AmitDiwan

AmitDiwan

Updated on 12-Nov-2019 07:53:44

153 Views

The Tuple class represents a 6-tuple. A tuple is a data structure that has a sequence of elements.It has six properties −Item1 − Get the value of the current Tuple object's first component.Item2 − Get the value of the current Tuple object's second component.Item3 − Get the value of the current Tuple object's ... Read More

How to create 5-Tuple or quintuple in C#?

AmitDiwan

AmitDiwan

Updated on 12-Nov-2019 07:50:32

153 Views

The Tuple class represents a 5-tuple, which is called quintuple. A tuple is a data structure that has a sequence of elements.It has five properties −Item1 − Get the value of the current Tuple object's first component.Item2 − Get the value of the current Tuple object's second component.Item3 − Get the value of ... Read More

Advertisements