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.DataEntryControls.WPFAssembly: RingSoft.DataEntryControls.WPF (in RingSoft.DataEntryControls.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 }