Creating strings using Console.WriteLine format

D

dan.goyette

Hello. I'm new to C#. I've searched this group, and tried other google
searches, and have not found an answer to this question already.

The question is pretty simple. I like the Console.WriteLine format of
passing a string containing {0}, {1}, etc, followed by a parameter
list of values. For example:

Console.WriteLine("The value is {0}", someValue);

I would like to be able to create strings in my applications using the
same format, with the {x} replacement. Is there a class I can call to
do this? I don't yet know my way around C# enough to figure this out.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top