AmitDiwan has Published 11365 Articles

DateTimeOffset.GetHashCode() Method in C#

AmitDiwan

AmitDiwan

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

46 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

62 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

75 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

79 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

91 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

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

226 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

326 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

194 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

234 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

Advertisements