Interviews2 answers
Why are out parameters a bad idea in .Net ?
2 Answers
@Akash Varshney: Could you please make your answer more clear?
Shweta LodhaPosted Jan 18, 2016, 2:08 AM EST
.Net does not verify that an out parameter is set inside a method that uses an out parameter before an exception is called. That means you may used uninitialized parameter without the compiler catching on to this.
Use ref parameter instead
Akash VarshneyPosted Oct 4, 2015, 3:47 AM EDT

