IdeaBlade DevForce 2010 Help Reference
GrammarString Class
Members  See Also  Send Feedback
IdeaBlade.Core Assembly > IdeaBlade.Core Namespace : GrammarString Class



A static class that extends the functionality of String.Format() for grammatical rules.

Object Model

GrammarString ClassIGrammarLibrary Interface

Syntax

Visual Basic (Declaration) 
Public Class GrammarString 
Visual Basic (Usage)Copy Code
Dim instance As GrammarString
C# 
public class GrammarString 
C++/CLI 
public ref class GrammarString 

Remarks

The format string passed to GrammarString.Format() can understand grammatical rules that are reflectively called in the GrammarString.Library instance. The default library supports the English rules for pluralization, possessives, and articles. For example, the statement GrammarString.Format("You have {1} new {plural({0},{1})}", "message", 3) results in the string "You have 3 new messages". See GrammarLibrary for a list of supported rules. Additional rules can be added by extending GrammarLibrary and setting the GrammarString.Library instance to point to that library.

Inheritance Hierarchy

System.Object
   IdeaBlade.Core.GrammarString

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2013 All Rights Reserved.