My code receives a warningCA1303 Microsoft.Globalization , "Do not pass literals as localized parameters" , but my code does not actually pass literals :
private void MyForm_Load(object sender, EventArgs e)
{
UpdateTitle();
}
private void UpdateTitle()
{
Version version = Assembly.GetExecutingAssembly().GetName().Version;
CultureInfo culture = CultureInfo.CurrentUICulture;
this.Text = String.Format(culture, "{0} v{1}.{2} Alpha r{3}", this.Text, version.Major, version.Minor, version.Build);
}
This code sets the title of the form like this: every time it loads:
MyFormNameAsSetInTheDesigner v0.1 Alpha r123
( version.buildactually contains an SVN revision, which is automatically updated with every commit, I do not use revision, because my version control scheme uses only 3 numbers, major.minor.revision)
, , . , Localizable = True , .
, ( - -) , .
, , (, , , FxCop, ).