ArcFM Desktop Developer Guide
StringFormatMethodAttribute Class
Members  Example 


Product Availability
Required Licenses
.NET Assembly
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 System.String.Format(System.IFormatProvider,System.String,System.Object[])-like form
Object Model
StringFormatMethodAttribute Class
Syntax
'Declaration
 
<AttributeUsageAttribute(ValidOn=AttributeTargets.Constructor Or  _
    AttributeTargets.Method, 
   AllowMultiple=False, 
   Inherited=True)>
Public NotInheritable Class StringFormatMethodAttribute 
   Inherits System.Attribute
'Usage
 
Dim instance As StringFormatMethodAttribute
[AttributeUsage(ValidOn=AttributeTargets.Constructor | 
    AttributeTargets.Method, 
   AllowMultiple=false, 
   Inherited=true)]
public sealed class StringFormatMethodAttribute : System.Attribute 
Example
[StringFormatMethod("message")]
public void ShowError(string message, params object[] args) { /* do something */ }
public void Foo() {
  ShowError("Failed: {0}"); // Warning: Non-existing argument in format string
}
Inheritance Hierarchy

System.Object
   System.Attribute
      Miner.Desktop.DesignerExpress.Annotations.StringFormatMethodAttribute

Requirements

Target Platforms: Windows XP SP3 (32-bit and 64-bit), Windows 7 (32-bit and 64-bit)

Not all Operating Systems are supported on all products. Visit the ArcFM Solution Supported Versions page for full details.

See Also

Reference

StringFormatMethodAttribute Members
Miner.Desktop.DesignerExpress.Annotations Namespace

 

 


Send Comment