The C# GetTypeCode function is employed to retrieve the type code of a string, providing an instance of TypeCode that specifies the object's type.
Signature
Example
public TypeCode GetTypeCode()
Parameters
It does not take any parameter.
Return
It returns type code of string class.
C# String GetTypeCode Method Example
Example
using System;
public class StringExample
{
public static void Main(string[] args)
{
string s1 = "Hello C#";
Console.WriteLine(s1.GetTypeCode());
}
}
Output:
Output
String