Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Using Using object disposal...

Using Using object disposal...

Scheduled Pinned Locked Moved C#
sharepointquestion
21 Posts 7 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Luc Pattyn

    Hi Ed, there must be a mistake somewhere; MSDN on SerialPort.Close explains: 1. Close() disposes of the internal streams (sounds OK) 2. you can Open() a port after it has been closed (cant be true if Close disposes of port) :confused:

    Luc Pattyn


    try { [Search CP Articles] [Search CP Forums] [Forum Guidelines] [My Articles] } catch { [Google] }


    E Offline
    E Offline
    Ed Poore
    wrote on last edited by
    #21

    Luc Pattyn wrote:

    you can Open() a port after it has been closed (cant be true if Close disposes of port)

    Looking at the code more deeply all that the base.Dispose(true) does is remove the component from the container and fires the Disposed event.  So looks like it may remain usable.


    My Blog[^]

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups