![]() |
1
1
不,没有办法。 |
![]() |
2
5
为什么不只是这个?
我认为没有办法把它嵌入到格式字符串中。 |
![]() |
3
1
你可以这样做:
不完美,但相对紧凑,可读。 |
![]() |
4
1
如果你经常做这种事情,那么考虑编写你自己的格式化程序,这样你就可以编写这样的代码… foo=string.format(new myformatter(),“toelichting:0:解释”,bar); MyFormatter将实现IFormatProvider和ICustomFormatter。 看看这个… .NET: Is there a String.Format form for inserting the value of an object property into a string? …这可能比您需要的要复杂(因为它处理反射和处理任何对象) |
|
Robert King · Unity C#语法问题-转换位置 1 年前 |
![]() |
JBryanB · 如何从基本抽象类访问类属性 1 年前 |
|
law · 检查答案按钮的输入字符串格式不正确 2 年前 |
![]() |
i_sniff_ket · 在unity之外使用unity类 2 年前 |