

- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Char.GetTypeCode() Method with Examples in C#
The Char.GetTypeCode() method in C# is used to return the TypeCode for value type Char.
Syntax
Following is the syntax −
public TypeCode GetTypeCode ();
Example
Let us now see an example to implement the Char.GetTypeCode() method −
using System; public class Demo { public static void Main(){ char val = '5'; bool res; Console.WriteLine("Hashcode for val = "+val.GetHashCode()); res = val.Equals('m'); Console.WriteLine("Return Value = "+res); Console.WriteLine("Numeric Value = "+Char.GetNumericValue(val)); TypeCode type = val.GetTypeCode(); Console.WriteLine("Type = "+type); } }
Output
This will produce the following output −
Hashcode for val = 3473461 Return Value = False Numeric Value = 5 Type = Char
Example
Let us now see another example −
using System; public class Demo { public static void Main(){ char val = 'B'; TypeCode type = val.GetTypeCode(); Console.WriteLine("Type = "+type); } }
Output
This will produce the following output −
Type = Char
- Related Questions & Answers
- Int64.GetTypeCode Method in C# with Examples
- UInt16.GetTypeCode() Method in C# with Examples
- Int32.GetTypeCode Method in C# with Examples
- UInt64.GetTypeCode() Method in C# with Examples
- UInt32.GetTypeCode() Method in C# with Examples
- Int16.GetTypeCode Method in C# with Examples
- C# Object.GetType() Method with Examples
- C# Queue.TrimExcess() Method with Examples
- C# Stack.TrimExcess() Method with Examples
- C# Object.GetHashCode() Method with Examples
- Java toDegrees() method with Examples
- jQuery not() method with Examples
- JavaScript removeEventListener() method with examples
- Java signum() method with Examples
- Java lang.Long.toBinaryString() method with Examples
- Java cbrt() method with Examples
Advertisements