Hi Everyone,
As you may know, when we have this code in Javascript :
function getName()
{
var getName = "Hello";
return getName;
}
var NameString = getName;
alert(NameString.toString());
will return ;
function getName()
{
var getName = "Hello";
return getName;
}
as string rather than the result of the function invocation.
How can I do the same thing in C# ?
For example how to get the function codes assigned to a Delegate
?
Thanks in advance.
(P.s : I think it seems I may need to use System.Reflection
)
The inner me thinks something like this :
public string delegate PointThat();
public string TheMethod()
{
string getName = "Hello World";
return getName;
}
// some function signature
{
PointThat t = TheMethod;
t.ToString() // returns the function string rather than invocation result
}