Hi all,
This is an excerpt from the Book "Programming Microsoft Visual C#: The
Language":
A function evaluates to the return value. When a reference type is
returned, a function is available as a left- or right-value of an
assignment. Functions that return a value type are restricted to
right-values of an assignment.
To test that statment I did sth like this:
class Program
{
static int Add(int x, int y)
{
return x + y;
}
static string AddS(string i, string j)
{
return i + j;
}
static void Main(string[] args)
{
//Add(2, 3) = 5; // this is an error - good
AddS("mulu", "geta") = "thomas"; // why is this an
error?
}
}
Can you help?
Thanks in advance