- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Double.GetTypeCode() Method in C#
The Double.GetTypeCode() method in C# is used to return the TypeCode for value type Double.
Syntax
The syntax is as follows −
public TypeCode GetTypeCode ();
Example
Let us now see an example −
using System; public class Demo { public static void Main() { double d = 15d; Console.WriteLine("Double Value = "+d); Console.WriteLine("HashCode of Double Value = "+d.GetHashCode()); TypeCode type = d.GetTypeCode(); Console.WriteLine("TypeCode of Double Value = "+type); } }
Output
This will produce the following output −
Double Value = 15 HashCode of Double Value = 1076756480 TypeCode of Double Value = Double
Example
Let us now see another example −
using System; public class Demo { public static void Main() { double d = 25.5d; Console.WriteLine("Double Value = "+d); Console.WriteLine("HashCode of Double Value = "+d.GetHashCode()); TypeCode type = d.GetTypeCode(); Console.WriteLine("TypeCode of Double Value = "+type); } }
Output
This will produce the following output −
Double Value = 25.5 HashCode of Double Value = 1077510144 TypeCode of Double Value = Double
Advertisements