GetTypeCode() method is used to get the TypeCode of the specified string.
Here TypeCode enum represents a specific type of object. In TypeCode every data type is represented by a specific number like String is represented by 18, Int32 is represented by 9, etc.
public TypeCode GetTypeCode ();
Return value: This method return an enumerated constant.
Below given are some examples to understand the implementation in a better way:
The TypeCode for Geeksforgeeks': String The TypeCode for '12': Int32
TypeCode for 'Geeks': 18, Which means it represents a String.
- How to get the typecode for enum in C#?
- C# | How to get the HashCode for the string
- How to Get the String that Represents ValueTuple Instance in C#?
- C# | String class
- File.Replace(String, String, String) Method in C# with Examples
- File.Replace(String, String, String, Boolean) Method in C# with Examples
- C# | How to get the HashCode of the tuple?
- C# | How to get a subset in a SortedSet
- C# | Get the maximum value in the SortedSet
- C# | How to get the Remaining Elements of the Tuple?
- C# | Get the minimum value in the SortedSet
- C# | Get the number of elements actually contained in the ArrayList
- C# | Get the number of strings in StringCollection
- C# | Get or Set at specified index in StringCollection
- C# | Get the number of elements contained in the Stack
- C# | Get object at the top of the Stack - Peek operation
- C# | Get the number of elements contained in the Queue
- C# | Get the object at the beginning of the Queue - Peek Operation
- C# | Get or Set the value associated with specified key in Hashtable
- C# | Get the number of elements in the SortedSet
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.