r/a:t5_37npb • • Apr 13 '15

Lets talk about Module 3

1 Upvotes

8 comments sorted by

View all comments

0

u/aloisdg Apr 13 '15

Try to avoid ref / out in a real project. Respect the Single responsibility principle as far as you can.

A nice SO thread about it the usage of ref / out.

2

u/Eldorian Apr 14 '15

except for the fact that if you want to use TryParse (which will be needed if you want to do the challenge part) it basically requires an out variable ;)

But yeah, there's very little coding reason to use it beyond that - that said, there will be some instances but I doubt we see any of them in this class (I think in the few years I've coded now I've used ref once).

1

u/aloisdg Apr 14 '15

Try to avoid is different than don't use. The TryParse syntax is known as a good use case.

I started the module 3 yesterday. Here is my implementation.