Use the static String.Format() method to build a new string. : String Format : Data Types C# Source Code


Custom Search

C# Source Code » Data Types » String Format »

 

Use the static String.Format() method to build a new string.








    
 

using System;
using System.Collections.Generic;
using System.Text;

class Program {
    static void Main(string[] args) {

        string formatStr;
        formatStr = String.Format("Don't you wish you had {0:C} in your account?", 99989.987);
        Console.WriteLine(formatStr);
    }
}

 
    
   
  
   







HTML code for linking to this page:

Follow Navioo On Twitter

C# Source Code

 Navioo Data Types
» String Format