Get string length and output string : String Length : String C# Examples


C# Examples » String » String Length »

 

Get string length and output string









    
using  System;    
    
class  MainClass  {      
    public  static  void  Main()  {      
        string  str1  =  "ABCDEabcde1234567890";      
    
        Console.WriteLine("str1:  "  +  str1);  
  
        Console.WriteLine("Length  of  str1:  "  +  str1.Length);      
    }
}
    
   
  
   



Output

str1: ABCDEabcde1234567890
Length of str1: 20


HTML code for linking to this page:

Follow Navioo On Twitter

C# Examples

 Navioo String
» String Length