insert variables into string csharp

Code Example - insert variables into string csharp

                
                        string data = "Mr. Rogers";
var str = %%%~COMPRESS~PRE~0~%%%quot;Hello {data}, how are you doing?";
                    
                
 

insert variables into a string csharp

                        
                                // For Console.WriteLine() and Console.Write() do...

string var0 = "one";
string var1 = "two";
Console.WriteLine("{0} and {1}", var0, var1);

/* Outputs:

one and two