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.Engine.AnnotationsAssembly: RingSoft.DataEntryControls.Engine (in RingSoft.DataEntryControls.Engine.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 }