How to change this to String.Format in C# -
original
string strcommandlineargs = (((("-i" + " ") + strvideopath + " -vcodec mjpeg -vframes 1 -an -f rawvideo -s ") + intwidth.tostring() + "x") + intheight.tostring() + " ") + strimagepath + " -ss 2"; i have done this
string strcommandlineargs = string.format("-i {0} -vcodec mjpeg -vframes 1 -an -f rawvideo -s {1}x{2} {3} -ss 2", strvideopath, intwidth, intheight, strimagepath); i cant find difference in use of ( , ) in string.
there no difference. brackets don't add special string.
Comments
Post a Comment