String Gettypecode()

The C# GetTypeCode method is used to get type code of string. It returns the instance of TypeCode which is used to specify the type of an object.

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

Input Required

This code uses input(). Please provide values below: