Tech Off Post

Single Post Permalink

View Thread: Involving Channel9 in .NET Framework Design Guidelines updates
  • User profile image

    Great idea.  I like Brads example of:
              public void UpdateSet(){
                FileStream stream = null;
                      stream = new FileStream(“SomeFile.dat”, FileMode.Open);
                      if(stream != null) stream.Close();
    (Even if I don't prefer this bracing style:)

    Testing for null before the stream.close is always a good idea IMO.  You usually end up back doing it anyway after testing and popping the null ref exceptions.  Naturally, I prefer using statement and they nest really nicely like:

    using(Stream s = new Stream())
    using(SomeStream ss = new SomeStream(s))

    However, I understand why the need to show finally to fully explain the idea.  Also, if you pick one way and stick with it across samples, it will help all the doco.  It is easy to convert to "using"s if that is what you like.

    As a side note on threaded posts here...
    If you will start posting threads like this, it may be easier to follow with a more "OE NG style" (i.e. smaller form facter/lines) so we can more easily follow and see the threads in progress.  This "big" html style is nice to look and works for video, but is hard to follow threads with many posts.  That said, I don't feel MS Web newsgroups are that easy either, but maybe have not given them their due as I find OE easier to nav.  Maybe you could post a thread on this to generate some ideas on how Channel9 could approach a new "threaded/multi-sort" UI option.  If you could put OE NG style in a region of web page, that would be fine start I think.  Doesn't Web Outlook do that kind of thing already?

    William Stacey [MVP]