AmitDiwan has Published 10744 Articles

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

AmitDiwan

AmitDiwan

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

106 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

127 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

134 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

DateTimeOffset.AddTicks() Method in C#

AmitDiwan

AmitDiwan

Updated on 12-Nov-2019 07:46:39

192 Views

The DateTimeOffset.AddTicks() method in C# is used to add a specified number of ticks to the value of this instance.SyntaxFollowing is the syntax −public DateTimeOffset AddTicks (long val);Above, the Val is the ticks, which is a number of 100-nanosecond ticks. To subtract ticks, set a negative value.Let us see the ... Read More

Dictionary.Remove() Method in C#

AmitDiwan

AmitDiwan

Updated on 12-Nov-2019 07:43:25

7K+ Views

The Dictionary.Remove() property in C# is used to remove the value with the specified key from the Dictionary.SyntaxFollowing is the syntax −public bool Remove (TKey key);Above, the key is the key to remove.ExampleLet us now see an example to implement the Dictionary.Remove() property −using System; using System.Collections.Generic; public class Demo ... Read More

Dictionary.Keys Property in C#

AmitDiwan

AmitDiwan

Updated on 12-Nov-2019 07:39:00

308 Views

The Dictionary.Keys property in C# is used to fetch all the keys in the Dictionary.SyntaxFollowing is the syntax −public System.Collections.Generic.Dictionary.KeyCollection Keys { get; }ExampleLet us now see an example to implement the Dictionary.Keys property −using System; using System.Collections.Generic; public class Demo {    public static void Main(){       ... Read More

Dictionary.Item[] Property in C#

AmitDiwan

AmitDiwan

Updated on 12-Nov-2019 07:35:43

454 Views

The Dictionary.Item[] property in C# is used to get or set the value associated with the specified key in the Dictionary.SyntaxFollowing is the syntax −public TValue this[TKey key] { get; set; }ExampleLet us now see an example to implement the Dictionary.Item[] property −using System; using System.Collections.Generic; public class Demo { ... Read More

Dictionary.Add() Method in C#

AmitDiwan

AmitDiwan

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

286 Views

The Dictionary.Add() method in C# is used to add a specified key and value to the dictionary.SyntaxFollowing is the syntax −public void Add (TKey key, TValue val);Above, the key parameter is the key, whereas Val is the value of the element.ExampleLet us now see an example to implement the Dictionary.Add() ... Read More

DateTimeOffset.AddSeconds() Method in C#

AmitDiwan

AmitDiwan

Updated on 12-Nov-2019 07:29:25

331 Views

The DateTimeOffset.AddSeconds() method in C# is used to return a new DateTimeOffset object that adds a specified number of whole and fractional seconds to the value of this instance.SyntaxFollowing is the syntax −public DateTimeOffset AddSeconds (double val);Above, Val is the number of seconds to be added. To subtract seconds, set ... Read More

Get the SUM of records between two given dates in MySQL

AmitDiwan

AmitDiwan

Updated on 12-Nov-2019 07:01:39

2K+ Views

For this, use BETWEEN keyword. Let us first create a −mysql> create table DemoTable1444    -> (    -> Value int,    -> PurchaseDate datetime    -> ); Query OK, 0 rows affected (0.45 sec)Insert some records in the table using insert −mysql> insert into DemoTable1444 values(40, '2019-01-10'); Query OK, ... Read More

Advertisements