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# | String class
- C# | HashSet Class
- C# | Collection Class
- C# | Hashtable Class
- Thread Class in C#
- C# | SortedSet Class
- C# | Stack Class
- C# | Queue Class
- C# | HybridDictionary Class
- C# | Tuple<T1,T2,T3,T4> Class
- C# | Sealed Class
- C# | Tuple<T1,T2,T3> Class
- C# | Math Class
- C# | Tuple<T1,T2> Class
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. 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.