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# | Tuple<T1,T2,T3,T4,T5,T6> Class
- C# | Tuple<T1,T2,T3,T4,T5> Class
- C# | FlowLayoutPanel Class
- C# | Static Class
- C# | Array Class
- C# | Object Class
- C# | Tuple Class
- C# | Tuple<T1,T2,T3,T4,T5,T6,T7> Class
- C# | ListBox Class
- C# | Dictionary Class
- C# | ToolTip Class
- C# | Stack Class
- C# | Queue 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.