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# | GroupBox Class
- C# | ListBox Class
- Thread Class in C#
- C# | Array Class
- C# | FlowLayoutPanel Class
- C# | Sealed Class
- C# | BitConverter Class
- Console Class in C#
- C# | Class and Object
- SortedDictionary Class in C#
- C# | NumericUpDown Class
- C# | Dictionary Class
- C# | DateTimePicker 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.