Places where String.Format is ''embedded'' in the C# with Example



Places where String.Format is ''embedded'' in the C# with Example

framework 
There are several places where you can use String.Format indirectly: The secret is to look for the overload with the 
signature string format, params object[] args, e.g.: 
Console.WriteLine(String.Format("{0} - {1}", name, value)); 
Can be replaced with shorter version: 
Console.WriteLine("{0} - {1}", name, value); 
There are other methods which also use String.Formate.g.: 
Debug.WriteLine(); // and Print() 
StringBuilder.AppendFormat(); 

0 Comment's

Comment Form

Submit Comment