Click here to Skip to main content
15,901,666 members
Home / Discussions / C#
   

C#

 
Questionexplain difference Pin
Mogamboo_Khush_Hua14-Dec-09 20:11
Mogamboo_Khush_Hua14-Dec-09 20:11 
AnswerRe: explain difference Pin
Migounette14-Dec-09 20:38
Migounette14-Dec-09 20:38 
QuestiondateTimePicker chosen problem Pin
miss YY14-Dec-09 15:42
miss YY14-Dec-09 15:42 
AnswerRe: dateTimePicker chosen problem Pin
_Maxxx_14-Dec-09 18:10
professional_Maxxx_14-Dec-09 18:10 
GeneralRe: dateTimePicker chosen problem Pin
miss YY14-Dec-09 19:01
miss YY14-Dec-09 19:01 
AnswerRe: dateTimePicker chosen problem Pin
dan!sh 14-Dec-09 18:23
professional dan!sh 14-Dec-09 18:23 
QuestionGraph an Equation Pin
Klazen14-Dec-09 15:22
Klazen14-Dec-09 15:22 
AnswerRe: Graph an Equation Pin
Dr.Walt Fair, PE14-Dec-09 16:16
professionalDr.Walt Fair, PE14-Dec-09 16:16 
I can think of 2 ways to do what you want and I've used both methods, although there may be other ways.

1) Write a parser and an evaluation "engine" class. The last time I did that I based it on the Forth system so it's real fast, but I converted the system to regular algebraic rather than reverse polish notation. I'd post a link, but the last time I did that I wrote it in Pascal, not C#, and I don't have a link to any code handy.

2) Use the CodeDomProvider class to write the function in the .NET language of your choice. For users I generally stick with VB since users seem most familiar with that. I've also used JScript, C#, F# in addition to VB. My article ScriptEngine - User Defined Calculations in C#, VB, JScript and F#[^] provides an example of how to do this, but you will need to modify for your own purposes. Note, that as mentioned in some of the comments, there doesn't appear to be a good way to ever unload the code if you have a long running application.

In either case you can allow more than just a simple formula, depending on how you limit things. You'll still need to evaluate the function for all your input values and handle the graphics.

Perhaps someone else will have additional ideas. Good luck!

CQ de W5ALT

Walt Fair, Jr., P. E.
Comport Computing
Specializing in Technical Engineering Software


QuestionPublic vs Private Memory Question Pin
thenutz7214-Dec-09 13:38
thenutz7214-Dec-09 13:38 
AnswerRe: Public vs Private Memory Question PinPopular
Luc Pattyn14-Dec-09 14:19
sitebuilderLuc Pattyn14-Dec-09 14:19 
GeneralRe: Public vs Private Memory Question Pin
_Maxxx_14-Dec-09 17:48
professional_Maxxx_14-Dec-09 17:48 
GeneralRe: Public vs Private Memory Question Pin
Luc Pattyn15-Dec-09 0:59
sitebuilderLuc Pattyn15-Dec-09 0:59 
GeneralRe: Public vs Private Memory Question Pin
harold aptroot15-Dec-09 1:10
harold aptroot15-Dec-09 1:10 
GeneralRe: Public vs Private Memory Question Pin
Luc Pattyn15-Dec-09 1:53
sitebuilderLuc Pattyn15-Dec-09 1:53 
GeneralRe: Public vs Private Memory Question Pin
harold aptroot15-Dec-09 2:14
harold aptroot15-Dec-09 2:14 
QuestionDifference between Critical section, Mutex and Semaphore ? Pin
sandeepranjan14-Dec-09 13:27
sandeepranjan14-Dec-09 13:27 
AnswerRe: Difference between Critical section, Mutex and Semaphore ? Pin
Corinna John14-Dec-09 22:28
Corinna John14-Dec-09 22:28 
QuestionC# serial port Pin
aniarun14-Dec-09 13:26
aniarun14-Dec-09 13:26 
AnswerRe: C# serial port Pin
Luc Pattyn14-Dec-09 14:24
sitebuilderLuc Pattyn14-Dec-09 14:24 
GeneralRe: C# serial port Pin
aniarun14-Dec-09 15:50
aniarun14-Dec-09 15:50 
GeneralRe: C# serial port Pin
Roger Wright14-Dec-09 19:33
professionalRoger Wright14-Dec-09 19:33 
GeneralRe: C# serial port Pin
aniarun15-Dec-09 15:15
aniarun15-Dec-09 15:15 
GeneralRe: C# serial port Pin
Roger Wright15-Dec-09 16:04
professionalRoger Wright15-Dec-09 16:04 
GeneralRe: C# serial port Pin
aniarun15-Dec-09 17:24
aniarun15-Dec-09 17:24 
GeneralRe: C# serial port Pin
Roger Wright15-Dec-09 18:28
professionalRoger Wright15-Dec-09 18:28 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.