RingSoft.DataEntryControls.Engine.Annotations Namespace
RingSoft.DataEntryControls.WPF Namespace

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.WPF
Assembly:  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
}

Inheritance Hierarchy


Object
  Attribute
    RingSoft.DataEntryControls.WPF..::..StringFormatMethodAttribute