特别是在使用String.Format的C#世界中,一切都很常见,通常作为VB.NET开发人员,除非我必须*我不是String.Format,
我更喜欢正常的字符串连接,例如:
V1 = V2 & "test-x" & V3 & "-;"
Run Code Online (Sandbox Code Playgroud)
对我而言,这比这更好:
V1 = String.Format("{0} test-x {1} -;", V2, V3)
Run Code Online (Sandbox Code Playgroud)
我错过了什么吗?或者这仅仅是个人偏好?
使用String.Format的原因(来自答案)(我会尽量保持最新)
**有时我需要动态更改样式或替换东西然后我使用String.Format*