StringFormatMethodAttribute Class
Indicates that the marked method builds string by the format pattern and (optional) arguments.
The parameter, which contains the format string, should be given in constructor. The format string
should be in String-like form.
Namespace:
RingSoft.DbLookup.Controls.WPF.PropertiesAssembly: RingSoft.DbLookup.Controls.WPF (in RingSoft.DbLookup.Controls.WPF.dll)
Syntax
[AttributeUsageAttribute] public sealed class StringFormatMethodAttribute : Attribute
<AttributeUsageAttribute> _ Public NotInheritable Class StringFormatMethodAttribute _ Inherits Attribute
[AttributeUsageAttribute] public ref class StringFormatMethodAttribute sealed : public Attribute
Examples
C#
[StringFormatMethod("message")] void ShowError(string message, params object[] args) { /* do something */ } void Foo() { ShowError("Failed: {0}"); // Warning: Non-existing argument in format string }