简体   繁体   English

字符串格式难题

[英]string.format conundrum

for me where the following simple string.format() doesn't work !! 对我来说,以下简单的string.format()不起作用!

return string.format(Resources.ABCSTRING, fieldName, fieldType);

where Resouces.ABCSTRING is Resouces.ABCSTRING在哪里

    {1} _{0};
    internal {1} {0}
    {
        get { return _{0}; }
        set
        {
            _{0} = value;
            UpdateRowValue(myObj, "{0}", value);
        }

    }
    internal void SetNull{0}()
    {
        UpdateRowValue(myObj, "{0}", DBNull.Value);
    }

It's obviously something basic but i don't see it !! 显然这是基本的东西,但我看不到! any help ? 有什么帮助吗?

You forgot to escape the standalone braces. 您忘记了逃脱独立牙套。

You need to change it to 您需要将其更改为

{1} _{0};
internal {1} {0}
{{
    get {{ return _{0}; }}
    set
    {{
        _{0} = value;
        UpdateRowValue(myObj, "{0}", value);
    }}

}}
internal void SetNull{0}()
{{
    UpdateRowValue(myObj, "{0}", DBNull.Value);
}}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM