| StringFormatMethodAttribute Class |
Indicates that the marked method builds string by format pattern and (optional) arguments.
Parameter, which contains format string, should be given in constructor. The format string
should be in
Format(IFormatProvider, String, Object)-like form
Inheritance Hierarchy
Namespace: Hangfire.AnnotationsAssembly: Hangfire.Core (in Hangfire.Core.dll) Version: 1.5.0.0
Syntax [AttributeUsageAttribute(AttributeTargets.Constructor|AttributeTargets.Method, AllowMultiple = false,
Inherited = true)]
public sealed class StringFormatMethodAttribute : Attribute
<AttributeUsageAttribute(AttributeTargets.Constructor Or AttributeTargets.Method, AllowMultiple := false,
Inherited := true)>
Public NotInheritable Class StringFormatMethodAttribute
Inherits Attribute
The StringFormatMethodAttribute type exposes the following members.
Constructors Properties Examples [StringFormatMethod("message")]
public void ShowError(string message, params object[] args) { }
public void Foo()
{
ShowError("Failed: {0}");
}
See Also