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. asynchronous write file problem

asynchronous write file problem

Scheduled Pinned Locked Moved C#
helpquestion
4 Posts 3 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.
  • H Offline
    H Offline
    hande54
    wrote on last edited by
    #1

    I tried to write a file asynchronously but I can not do it. Could you help me on this issue ? any recommendations are strongly appreciated :)

    B D 2 Replies Last reply
    0
    • H hande54

      I tried to write a file asynchronously but I can not do it. Could you help me on this issue ? any recommendations are strongly appreciated :)

      B Offline
      B Offline
      Bassam Saoud
      wrote on last edited by
      #2

      What is the error you are getting?

      1 Reply Last reply
      0
      • H hande54

        I tried to write a file asynchronously but I can not do it. Could you help me on this issue ? any recommendations are strongly appreciated :)

        D Offline
        D Offline
        Dave Kreskowiak
        wrote on last edited by
        #3

        Not without seeing your code and getting an explanation of the problem you're having.

        A guide to posting questions on CodeProject[^]
        Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
             2006, 2007, 2008
        But no longer in 2009...

        H 1 Reply Last reply
        0
        • D Dave Kreskowiak

          Not without seeing your code and getting an explanation of the problem you're having.

          A guide to posting questions on CodeProject[^]
          Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
               2006, 2007, 2008
          But no longer in 2009...

          H Offline
          H Offline
          hande54
          wrote on last edited by
          #4

          sorry for unclear explanation of my problem. the code that I have try is below: delegateGetInputReportData getInputReportDelegate = null; getInputReportDelegate = new delegateGetInputReportData(myAccessForm); base.Invoke(getInputReportDelegate,/*args*/value); a new delegate method is created on each data receive event. in myccessForm I try TextWriter tx = new StreamWriter("Data.txt"); tx.WriteLine(index +" " + s1.ToString() + "0" + s2.ToString() + "\t\t" + str + "\t\t" + p.ToString()); but it causes an exception that file is used by another program I tried to solve problem by using mutex but It does not work.

          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