SIGN UP MEMBER LOGIN:    
ARTICLE

Formula Generator - A Regular Expression Generator Class in C# and .NET

Posted by Tiberiu Ionescu Articles | Algorithms in C# August 17, 2004
The attached source code is a class - FormulaGenerator, which is a component that interprets and evaluate a string expression
Reader Level:
Download Files:
 

The attached source code is a class - FormulaGenerator, which is a component that interprets and evaluate a string expression.

String Expression Interpreter:

This component interpret a string expression and return the result of the expression or error. The component works with +, -, *, / (Addition, Subtraction, Multiplication and Division) and with any level of parenthesis.

Example of valid expression: (1 + 6) * (20 / (5 + 5)) Also this component could be modified to work with literal expression (every literal can be load from database; could be useful for salary calculus)

Download the attached source code for more details.

Login to add your contents and source code to this article
share this article :
post comment
 

This is really awesome!!! great work dude!!!

Posted by rahul meena Oct 12, 2010
Team Foundation Server Hosting
Become a Sponsor
PREMIUM SPONSORS
  • Finally – a virtual platform that delivers next-generation Windows Server 2008 Hyper-V virtualization technology from a managed hosting partner you can truly depend on. Visit www.maximumasp.com/max for a FREE 30 day trial. Hurry offer ends soon. Climb aboard the MaxV platform and take advantage of High Availability, Intelligent Monitoring, Recurrent Backups, and Scalability – with no hassle or hidden fees. As a managed hosting partner focused solely on Microsoft technologies since 2000, MaximumASP is uniquely qualified to provide the superior support that our business is built on. Unparalleled expertise with Microsoft technologies lead to working directly with Microsoft as first to offer IIS 7 and SQL 2008 betas in a hosted environment; partnering in the Go Live Program for Hyper-V; and product co-launches built on WS 2008 with Hyper-V technology.
    ceTE software specializes in components for dynamic PDF generation and manipulation. The DynamicPDF™ product line allows you to dynamically generate PDF documents, merge PDF documents and new content to existing PDF documents from within your applications. Visit DynamicPDF here
6 Months Free & No Setup Fees ASP.NET Hosting!
Become a Sponsor