RingSoft.DbLookup.Controls.WPF.Properties Namespace
RingSoft.DbMaintenance 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.DbMaintenance
Assembly:  RingSoft.DbMaintenance (in RingSoft.DbMaintenance.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.DbMaintenance..::..StringFormatMethodAttribute