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

C#

 
Question[Message Deleted] Pin
gamer112717-Aug-09 2:47
gamer112717-Aug-09 2:47 
AnswerRe: Array in class Pin
stancrm17-Aug-09 2:59
stancrm17-Aug-09 2:59 
GeneralRe: Array in class Pin
gamer112717-Aug-09 3:06
gamer112717-Aug-09 3:06 
GeneralRe: Array in class Pin
stancrm17-Aug-09 3:08
stancrm17-Aug-09 3:08 
QuestionHow to add a toolbar in a window using c# Pin
svt gdwl17-Aug-09 2:46
svt gdwl17-Aug-09 2:46 
AnswerRe: How to add a toolbar in a window using c# Pin
stancrm17-Aug-09 2:51
stancrm17-Aug-09 2:51 
AnswerRe: How to add a toolbar in a window using c# Pin
mustang8617-Aug-09 6:29
mustang8617-Aug-09 6:29 
QuestionCalc expression from string at runtime Pin
bonzaiholding17-Aug-09 2:44
bonzaiholding17-Aug-09 2:44 
If i want to run code at runtime from string (Something simple)
How can i do it?

for example , i want something that does "operateThisString" function :

public int X
      {
          //Some Expression
          get { return this.Y * this.Z; }
      }

      public int Y
      {
          //Some Expression
          get { return (int)((Math.Sin(new Random() * 10))*52); }
      }

      private void button1_Click(object sender, EventArgs e)
      {

          string codeExpressionThatReturnInt = "return (this.X*this.Y%2);";
          int numbber = operateThisString(codeExpressionThatReturnInt);
          if (number == 0)
              MessageBox.Show("This number is Even.");
          else if(number==1)
              MessageBox.Show("This number is Odd.");
      }



the string codeExpression can come from the user in some way.
What is the simplest way to do it?
AnswerRe: Calc expression from string at runtime Pin
stancrm17-Aug-09 3:06
stancrm17-Aug-09 3:06 
AnswerRe: Calc expression from string at runtime Pin
Eddy Vluggen17-Aug-09 3:07
professionalEddy Vluggen17-Aug-09 3:07 
GeneralRe: Calc expression from string at runtime Pin
bonzaiholding17-Aug-09 4:22
bonzaiholding17-Aug-09 4:22 
GeneralRe: Calc expression from string at runtime Pin
Eddy Vluggen17-Aug-09 4:43
professionalEddy Vluggen17-Aug-09 4:43 
AnswerRe: Calc expression from string at runtime Pin
PIEBALDconsult17-Aug-09 6:03
mvePIEBALDconsult17-Aug-09 6:03 
Question[Message Deleted] Pin
saber ahmadi17-Aug-09 1:35
saber ahmadi17-Aug-09 1:35 
AnswerRe: Custom Setup for c# app Pin
Eddy Vluggen17-Aug-09 3:41
professionalEddy Vluggen17-Aug-09 3:41 
GeneralRe: Custom Setup for c# app Pin
saber ahmadi18-Aug-09 0:22
saber ahmadi18-Aug-09 0:22 
QuestionYour current security settings prohibit running ActiveX controls on this page. As a result, the page may not display correctly Pin
Affan Saied17-Aug-09 1:13
Affan Saied17-Aug-09 1:13 
QuestionIEqualityComparer Pin
vidhyaravichandar17-Aug-09 1:00
vidhyaravichandar17-Aug-09 1:00 
AnswerCross post: Being answered in .NET Framework section Pin
Pete O'Hanlon17-Aug-09 3:45
mvePete O'Hanlon17-Aug-09 3:45 
GeneralRe: Cross post: Being answered in .NET Framework section Pin
vidhyaravichandar17-Aug-09 15:23
vidhyaravichandar17-Aug-09 15:23 
QuestionHow to Change the datagridview cell value color Pin
Nitin K17-Aug-09 0:08
Nitin K17-Aug-09 0:08 
AnswerRe: How to Change the datagridview cell value color Pin
Coding C#17-Aug-09 0:27
Coding C#17-Aug-09 0:27 
GeneralRe: How to Change the datagridview cell value color Pin
Henry Minute17-Aug-09 0:50
Henry Minute17-Aug-09 0:50 
GeneralRe: How to Change the datagridview cell value color Pin
Nitin K17-Aug-09 1:23
Nitin K17-Aug-09 1:23 
GeneralRe: How to Change the datagridview cell value color Pin
Henry Minute17-Aug-09 1:31
Henry Minute17-Aug-09 1:31 

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.