AmitDiwan has Published 10744 Articles

DateTimeOffset.AddDays() Method in C#

AmitDiwan

AmitDiwan

Updated on 11-Nov-2019 07:10:43

482 Views

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

DateTimeOffset.Add() Method in C#

AmitDiwan

AmitDiwan

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

106 Views

The DateTimeOffset.Add() method in C# is used to return a new DateTimeOffset object that adds a specified time interval to the value of this instance.SyntaxFollowing is the syntax −public DateTimeOffset Add (TimeSpan t);ExampleLet us now see an example to implement the DateTimeOffset.Add() method −using System; public class Demo {   ... Read More

Type.GetNestedTypes() Method in C#

AmitDiwan

AmitDiwan

Updated on 11-Nov-2019 07:05:45

115 Views

The Type.GetNestedTypes() method in C# is used to get the types nested within the current Type.SyntaxFollowing is the syntax −public Type[] GetNestedTypes (); public abstract Type[] GetNestedTypes (System.Reflection.BindingFlags bindingAttr);ExampleLet us now see an example to implement the Type.GetNestedTypes() method −using System; public class Demo {    public static void Main(){ ... Read More

Type.GetNestedType() Method in C#

AmitDiwan

AmitDiwan

Updated on 11-Nov-2019 07:00:36

145 Views

The Type.GetNestedType() method in C# is used to get a specific type of nested within the current Type.SyntaxFollowing is the syntax −public Type GetNestedType (string name); public abstract Type GetNestedType (string name, System.Reflection.BindingFlags bindingAttr);ExampleLet us now see an example to implement the Type.GetNestedType() method −using System; public class Demo { ... Read More

Decimal.FromOACurrency() Method in C#

AmitDiwan

AmitDiwan

Updated on 11-Nov-2019 06:58:19

79 Views

The Decimal.FromOACurrency() method in C# is used to convert the specified 64-bit signed integer, which contains an OLE Automation Currency value, to the equivalent Decimal valueSyntaxFollowing is the syntax −public static decimal FromOACurrency (long val);Above, Val is an OLE Automation Currency value.ExampleLet us now see an example to implement the ... Read More

Int32.CompareTo Method in C# with Examples

AmitDiwan

AmitDiwan

Updated on 11-Nov-2019 06:56:40

229 Views

The Int32.CompareTo method in C# is used to compare this instance to a specified object or Int32 and returns an indication of their relative values.SyntaxFollowing is the syntax −public int CompareTo (int val); public int CompareTo (object val);Above, the value of the 1st syntax is an integer to compare, whereas, ... Read More

Int16.MinValue Field in C# with Examples

AmitDiwan

AmitDiwan

Updated on 11-Nov-2019 06:52:36

134 Views

The Int16.MinValue field in C# represents the smallest possible value of an Int16.SyntaxFollowing is the syntax −public const short MinValue = -32768;ExampleLet us now see an example to implement the Int16.MinValue field −using System; public class Demo {    public static void Main(){       short val1 = 23; ... Read More

Int16.MaxValue Field in C# with Examples

AmitDiwan

AmitDiwan

Updated on 11-Nov-2019 06:50:06

226 Views

The Int16.MaxValue field in C# represents the largest possible value of an Int16.SyntaxFollowing is the syntax −public const short MaxValue = 32767;ExampleLet us now see an example to implement the Int16.MaxValue field −using System; public class Demo {    public static void Main(){       short val1 = 23; ... Read More

Int16.GetTypeCode Method in C# with Examples

AmitDiwan

AmitDiwan

Updated on 11-Nov-2019 06:45:31

103 Views

The Int16.GetTypeCode() method in C# is used to return the TypeCode for value type Int16.SyntaxFollowing is the syntax −public TypeCode GetTypeCode ();ExampleLet us now see an example to implement the Int16.GetTypeCode() method −using System; public class Demo {    public static void Main(){       short val1 = 0; ... Read More

Int16.GetHashCode() Method in C# with Examples

AmitDiwan

AmitDiwan

Updated on 11-Nov-2019 06:43:06

97 Views

The Int16.GetHashCode() method in C# is used to return the hash code for the current instance.SyntaxFollowing is the syntax −public override int GetHashCode ();ExampleLet us now see an example to implement the Int16.GetHashCode() method −using System; public class Demo {    public static void Main(){       short val1 ... Read More

Advertisements