I am trying to standardize the way I write code. Which is the best way to place the values into a string, method 1 or 2?string myCat = persian;// Method 1Console.WriteLine(I have a wild {0} cat that likes to visit, myCat);// Method 2Console.WriteLine(I have a wild  + myCat +  cat that likes to visit);I would like to point out that I am intending this for simple uses, where StringBuilder would be overkill.
Cleanest way to place values into strings
c#;strings
For anyone who is curious, here is the IL for the OP's example.IL_0001: ldstr persianIL_0006: stloc.0IL_0007: ldstr I have a wild {0} cat that likes to visitIL_000c: ldloc.0IL_000d: call string [mscorlib]System.String::Format(string, object)IL_0012: call void [mscorlib]System.Console::WriteLine(string)IL_0017: nopIL_0018: ldstr I have a wild IL_001d: ldloc.0IL_001e: ldstr  cat that likes to visitIL_0023: call string [mscorlib]System.String::Concat(string, string, string)IL_0028: call void [mscorlib]System.Console::WriteLine(string)Personally I opt for String.Format() because it does so much for so little.Consider this example:Console.WriteLine(I have  + count.ToString() +  wild cats that like to visit);Which results with this IL:IL_0030: ldstr I have IL_0035: ldloca.s countIL_0037: call instance string [mscorlib]System.Int32::ToString()IL_003c: ldstr  wild cats that like to visitIL_0041: call string [mscorlib]System.String::Concat(string, string, string)IL_0046: call void [mscorlib]System.Console::WriteLine(string)In comparison, using String.FormatConsole.WriteLine(String.Format(I have {0} wild cats that like to visit, count));...is slightly better.IL_0096: ldstr I have {0} wild cats that like to visitIL_009b: ldloc.1IL_009c: box [mscorlib]System.Int32IL_00a1: call string [mscorlib]System.String::Format(string, object)IL_00a6: call void [mscorlib]System.Console::WriteLine(string)Not convinced?  How about this realistic example with two substitution parameters including a date (I'm often inserting a date into log strings, for example).The bad way:Console.WriteLine(Today is  + System.DateTime.Now.ToString(M/d/yy) +  and I have  + count.ToString() +  wild cats that like to visit);Insane block of IL this time:IL_004c: ldc.i4.5IL_004d: newarr [mscorlib]System.StringIL_0052: stloc.2IL_0053: ldloc.2IL_0054: ldc.i4.0IL_0055: ldstr Today is IL_005a: stelem.refIL_005b: ldloc.2IL_005c: ldc.i4.1IL_005d: call valuetype [mscorlib]System.DateTime [mscorlib]System.DateTime::get_Now()IL_0062: stloc.3IL_0063: ldloca.s CS$0$0001IL_0065: ldstr M/d/yyIL_006a: call instance string [mscorlib]System.DateTime::ToString(string)IL_006f: stelem.refIL_0070: ldloc.2IL_0071: ldc.i4.2IL_0072: ldstr  and I have IL_0077: stelem.refIL_0078: ldloc.2IL_0079: ldc.i4.3IL_007a: ldloca.s countIL_007c: call instance string [mscorlib]System.Int32::ToString()IL_0081: stelem.refIL_0082: ldloc.2IL_0083: ldc.i4.4IL_0084: ldstr  wild cats that like to visitIL_0089: stelem.refIL_008a: ldloc.2IL_008b: call string [mscorlib]System.String::Concat(string[])IL_0090: call void [mscorlib]System.Console::WriteLine(string)Using String.Format:Console.WriteLine(String.Format(Today is {0:M/d/yy} and I have {1} wild cats that like to visit, DateTime.Now, count));Much much shorter than the other version:IL_00ac: ldstr Today is {0:M/d/yy} and I have {1} wild cats that like to visitIL_00b1: call valuetype [mscorlib]System.DateTime [mscorlib]System.DateTime::get_Now()IL_00b6: box [mscorlib]System.DateTimeIL_00bb: ldloc.1IL_00bc: box [mscorlib]System.Int32IL_00c1: call string [mscorlib]System.String::Format(string, object, object)IL_00c6: call void [mscorlib]System.Console::WriteLine(string)The only thing that bothers me a little bit is the boxing operation, since String.Format only takes objects for the substitution parameters.  From every other perspective, it is easier to read and results in more efficient IL.