Click here to Skip to main content
15,077,137 members
Home / Discussions / C#
   

C#

 
QuestionWhy Main? Pin
Saranya B11-Apr-07 19:19
MemberSaranya B11-Apr-07 19:19 
AnswerRe: Why Main? Pin
CPallini11-Apr-07 20:49
mveCPallini11-Apr-07 20:49 
AnswerRe: Why Main? Pin
kkun11-Apr-07 21:25
Memberkkun11-Apr-07 21:25 
AnswerRe: Why Main? Pin
Jaiprakash M Bankolli11-Apr-07 21:45
MemberJaiprakash M Bankolli11-Apr-07 21:45 
AnswerRe: Why Main? Pin
Guffa11-Apr-07 22:31
MemberGuffa11-Apr-07 22:31 
QuestionRichTextBox flickering Pin
moid.ahmed11-Apr-07 19:16
Membermoid.ahmed11-Apr-07 19:16 
AnswerRe: RichTextBox flickering Pin
andre_swnpl11-Apr-07 19:29
Memberandre_swnpl11-Apr-07 19:29 
QuestionEvaluvating Expression in C# Pin
act_ramesh11-Apr-07 18:53
Memberact_ramesh11-Apr-07 18:53 
Hi EveryBody,

We know that Delegate is a Functional Pointer. But i want to pass Member name as a variable to Delegates. The example given below.

*--------------------------------------------------------------------------
using System;

namespace Delegate_concept
{
public delegate void MyFunction(int a, int b);
class Delegate_Method
{
public static void Function1 (int x, int y)
{
Console.WriteLine("Sum is"+(x+y));
}
public static void Function2 (int x, int y)
{
Console.WriteLine("Sub is"+(x-y));
}
public static void Function3(int x, int y)
{
Console.WriteLine("Mul is"+(x*y));
}

static void Main(string[] args)
{
int i = 1;
string Fstring = "Function";
string nString;

for ( i=1; i<=3; i++)
{
nString=Fstring+i.ToString();
MyFunction mObj = new MyFunction(@(nString));
mObj(20,5);
Console.Read();
}
}
}
}

*------------------------------------------------------------------------

In the above example, i am storing each function name into "nString" variable.
While creating instance, can i pass this variable name as a parameter. Because the variable name contains name of the function. Or i want to evaluvate the variable nString and execute the function name which i stored in "nString" variable.

If any solution or suggession please write to: act_ramesh@yahoo.com

Thanks


sfsad sdafasd fsadfasdf asd fsdf sdafsadsdafsda

AnswerRe: Evaluvating Expression in C# Pin
Stevo Z11-Apr-07 22:28
MemberStevo Z11-Apr-07 22:28 
QuestionWhy didn't I get the job? Pin
Mark J. Miller11-Apr-07 12:04
MemberMark J. Miller11-Apr-07 12:04 
AnswerRe: Why didn't I get the job? Pin
J$11-Apr-07 12:47
MemberJ$11-Apr-07 12:47 
GeneralRe: Why didn't I get the job? Pin
Mark J. Miller11-Apr-07 13:01
MemberMark J. Miller11-Apr-07 13:01 
GeneralRe: Why didn't I get the job? Pin
J$11-Apr-07 13:38
MemberJ$11-Apr-07 13:38 
GeneralRe: Why didn't I get the job? Pin
Mark J. Miller11-Apr-07 13:45
MemberMark J. Miller11-Apr-07 13:45 
AnswerRe: Why didn't I get the job? Pin
Colin Angus Mackay11-Apr-07 12:49
MemberColin Angus Mackay11-Apr-07 12:49 
GeneralRe: Why didn't I get the job? Pin
Mark J. Miller11-Apr-07 13:16
MemberMark J. Miller11-Apr-07 13:16 
AnswerRe: Why didn't I get the job? Pin
Christian Graus11-Apr-07 13:51
protectorChristian Graus11-Apr-07 13:51 
GeneralRe: Why didn't I get the job? Pin
Mark J. Miller12-Apr-07 2:59
MemberMark J. Miller12-Apr-07 2:59 
AnswerRe: Why didn't I get the job? Pin
Martin#11-Apr-07 20:22
MemberMartin#11-Apr-07 20:22 
GeneralRe: Why didn't I get the job? Pin
blackjack215011-Apr-07 21:06
Memberblackjack215011-Apr-07 21:06 
GeneralRe: Why didn't I get the job? Pin
Martin#11-Apr-07 21:21
MemberMartin#11-Apr-07 21:21 
GeneralRe: Why didn't I get the job? Pin
Mark J. Miller12-Apr-07 2:55
MemberMark J. Miller12-Apr-07 2:55 
GeneralRe: Why didn't I get the job? Pin
Martin#12-Apr-07 3:07
MemberMartin#12-Apr-07 3:07 
GeneralRe: Why didn't I get the job? Pin
Mark J. Miller12-Apr-07 3:25
MemberMark J. Miller12-Apr-07 3:25 
GeneralRe: Why didn't I get the job? Pin
Martin#12-Apr-07 3:32
MemberMartin#12-Apr-07 3:32 

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.