Results 1 to 2 of 2

Thread: [2005] Combine Using and With...

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Aug 2006
    Location
    In my head
    Posts
    913

    [2005] Combine Using and With...

    I am not sure if this is possible. I want to have the using statement work the same way With does along with its current capabilities....Is there a way to merge them together? Here is a small example of what I would love to be able to do:
    Code:
    Using sw As New StreamWriter(FileName, True)
       .Write(MyMessage)
       .Close
    End Using
    Granted it would only be 2 extra lines, but still.....

    Thanks and hope everyone is well!

    D
    Platforms of choice: Visual Studio 2005/2008 Professional : Visual Studio 2010 Enterprise : PHP - Notepad++/WAMP

    Please Rate If I helped you.
    Please remember to mark threads as closed if your issue has been resolved.

    Reserved Words in Access | Connection Strings

  2. #2
    Fanatic Member Clanguage's Avatar
    Join Date
    Jan 2008
    Location
    North Carolina
    Posts
    659

    Re: [2005] Combine Using and With...

    I tried many different combinations and came to the conclusion that it is not possible
    CLanguage;
    IF Post = HelpFull Then
    RateMe
    Else
    Say("Shut UP")
    End If
    DotNet rocks
    VB 6, VB.Net 2003, 2005, 2008, 2010, SQL 2005, WM 5.0,ahem ?OpenRoad?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width