Console::Writeline()

sjesweak

Member
Joined
Feb 1, 2004
Messages
5
Console::WriteLine(S"{0} is not a valid file or directory.", path);

I know the {0} is where the path variable is placed can someone please tell me how the {0} works and what all this can be used for.
 
The {0} thing is not specific to WriteLine(); it is a feature of the
[mshelp=ms-help://MS.MSDNQTR.2003FEB.1033/cpref/html/frlrfSystemStringClassFormatTopic.htm]String.Format()[/mshelp] method, which Console.WriteLine() conveniently
calls for you. You can include more parameters by specifying
{1}, {2}, etc. and passing more parameters to the function.
 
Back
Top