Use Substring() 1 : String : Data Types C# Source Code


Custom Search

C# Source Code » Data Types » String »

 

Use Substring() 1









    

/*
C#: The Complete Reference 
by Herbert Schildt 

Publisher: Osborne/McGraw-Hill (March 8, 2002)
ISBN: 0072134852
*/
// Use Substring(). 
 
using System; 
 
public class SubStr {  
  public static void Main() {  
    string orgstr = "C# makes strings easy."; 
 
    // construct a substring 
    string substr = orgstr.Substring(5, 12); 
     
    Console.WriteLine("orgstr: " + orgstr); 
    Console.WriteLine("substr: " + substr); 
 
  }  
}


           
       
    
   
  
   







HTML code for linking to this page:

Follow Navioo On Twitter

C# Source Code

 Navioo Data Types
» String