News for hackers. Stuff that matters.
Re:Things I Wish Someone Had Told Me About Go by fmstephe on Monday March 11, 2013 @12:25PM (#5357733)
(I am not a .net developer) But having read the msdn description of the ref keyword

http://msdn.microsoft.com/en-gb/library/14akc2c7(v=vs.71).as...

I would expect that refs are roughly equivalent to the following

http://play.golang.org/p/3cwx5Qofc8

Where the commented out code represents the .net equivalent. I would expect that the .net compiler simply rewrites your code for you to hide the slightly tricky messing about with pointers. So the .net ref looks like a bit of syntactic sugar over what you were trying to do in your post.

There are no comments on this comment yet.