This is a mirror of official site: http://jasper-net.blogspot.com/

return a = “hello”; What will Happen?

| Wednesday, April 28, 2010
I came across an interesting piece of code the other day, something I didn’t even know possible in C#.

Consider the next code (which doesn’t make lots of sense, but it gets the point across):

public string Test()
{
 string a;
 return a = "hello";
}

What do you think will happen? what will be returned from this method?

Read more: IronShay

Posted via email from jasper22's posterous

0 comments: