Double.GetTypeCode() Method in C#
Double.GetTypeCode() Method is used to return the TypeCode for value type Double.
Syntax: public TypeCode GetTypeCode ();
Return Value: This method returns the enumerated constant, Double.
Below programs illustrate the use of Double.GetTypeCode() Method:
Example 1:
using System;
using System.Globalization;
class GFG {
public static void Main()
{
double value1 = 10d;
TypeCode value = value1.GetTypeCode();
Console.WriteLine( "TypeCode is {0}" , value);
}
}
|
Output:
TypeCode is Double
Example 2:
using System;
using System.Globalization;
class GFG {
public static void Main()
{
get (5d);
get (5.5d);
get (10d);
get (7.5d);
}
public static void get ( double value1)
{
TypeCode value = value1.GetTypeCode();
Console.WriteLine( "TypeCode is {0}" , value);
}
}
|
Output:
TypeCode is Double
TypeCode is Double
TypeCode is Double
TypeCode is Double
Reference:
Last Updated :
12 Apr, 2019
Like Article
Save Article
Share your thoughts in the comments
Please Login to comment...