Creating Strings : String : Data Types C# Source Code


Custom Search

C# Source Code » Data Types » String »

 

Creating Strings








    


using System;


  public class CreatingStrings
  {
    static void Main(string[] args)
    {
      char MyChar = 'A';

      MyChar = (char)65;

      char[] MyChar2 = {'H','e','l','l','o','\0'};

      char[] MyChar3 = new char[6];

      MyChar3[0] = 'H';
      MyChar3[1] = 'e';
      MyChar3[2] = 'l';
      MyChar3[3] = 'l';
      MyChar3[4] = 'o';
      MyChar3[5] = '\0';
    }
  }


           
       
    
   
  
   







HTML code for linking to this page:

Follow Navioo On Twitter

C# Source Code

 Navioo Data Types
» String