C# 字符串格式难题
对于我来说,以下简单的string.format()不起作用C# 字符串格式难题,c#,C#,对于我来说,以下简单的string.format()不起作用 return string.format(Resources.ABCSTRING, fieldName, fieldType); resources.ABCSTRING在哪里 {1} _{0}; internal {1} {0} { get { return _{0}; } set { _{0} = value;
return string.format(Resources.ABCSTRING, fieldName, fieldType);
resources.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);
}
这显然是一些基本的东西,但我看不出来!!有什么帮助吗?您忘记退出独立大括号 你需要把它改成
{1} _{0};
internal {1} {0}
{{
get {{ return _{0}; }}
set
{{
_{0} = value;
UpdateRowValue(myObj, "{0}", value);
}}
}}
internal void SetNull{0}()
{{
UpdateRowValue(myObj, "{0}", DBNull.Value);
}}
你忘了避开独立的大括号 你需要把它改成
{1} _{0};
internal {1} {0}
{{
get {{ return _{0}; }}
set
{{
_{0} = value;
UpdateRowValue(myObj, "{0}", value);
}}
}}
internal void SetNull{0}()
{{
UpdateRowValue(myObj, "{0}", DBNull.Value);
}}