Introduce string : String : Data Types C# Source Code


Custom Search

C# Source Code » Data Types » String »

 

Introduce string









    

/*
C#: The Complete Reference 
by Herbert Schildt 

Publisher: Osborne/McGraw-Hill (March 8, 2002)
ISBN: 0072134852
*/
// Introduce string. 
 
using System; 
 
public class StringDemo {  
  public static void Main() {  
 
    char[] charray = {'A', ' ', 's', 't', 'r', 'i', 'n', 'g', '.' }; 
    string str1 = new string(charray); 
    string str2 = "Another string."; 
 
    Console.WriteLine(str1); 
    Console.WriteLine(str2); 
  }  
}


           
       
    
   
  
   







HTML code for linking to this page:

Follow Navioo On Twitter

C# Source Code

 Navioo Data Types
» String