string type represents a sequence of characters - CSharp Language Basics

CSharp examples for Language Basics:Data Type

Description

string type represents a sequence of characters

Demo Code

using System;/*from  w  ww  . j ava2 s  . c o m*/
class Test
{
   static void Main(){
      string message = "Hello world";
      string upperMessage = message.ToUpper();
      Console.WriteLine (upperMessage);               // HELLO WORLD
      int x = 2015;
      message = message + x.ToString();
      Console.WriteLine (message);                    // Hello world2015
   }
}

Result


Related Tutorials