How to run 2 StreamWriters in parallel [closed] - c#

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 7 years ago.
Improve this question
Recently I was working on a project to write a csv file and an XML file at the same time.
They contain the same metadata information, how to open two StreamWriters in C# at the same time?

The question is too broad so the answer is generic. In order "to write a csv file and an XML file at the same time" you have to implement sort of multi-threading, using either Task Parallel Library (TPL - recommended) or other technique available in .NET, and run the aforementioned procedures on two different threads (in either blocking or non-blocking mode).
More details on TPL implementation: https://msdn.microsoft.com/en-us/library/dd537609%28v=vs.110%29.aspx.
Hope this may help.

Related

How to add both F# and C# file together in .Net maui? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 10 hours ago.
Improve this question
I checked on internet but was unable to find how can I add both F# and C# file in .net maui with visual studio. I was making an application that require F# for calculation and C# (for various reasons like saving data to JSON, easier development, etc.)
I tried integrating C# with python but failed several times due to different errors. So ended up with F#. I was expecting to be able to use GUI, data saving to JSON and calculation together in my application.

Passing of value from one separate application to another [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I'm looking for advice and experiences about proper way to create outputs from one separate application to other independent application which must take this value for own implementation conditions. to make it clearer in primitive way for example output application writes some undated value to the text file, and another running application with available path to this file reads it in time loop and if value is found makes some implementation. But I'm trying to find what is more correct way to do the same to pass it from one application directly to another
Message Queing is certainly what you are looking for.
It will let some applications put messages on the queue and some others (or not actually) consume these messages.
https://msdn.microsoft.com/en-us/library/ms711472(v=vs.85).aspx

Can a C# .exe file be accessed by multiple users simultaneously? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I created a small program for one department in our company. I put the C# exe file in one of the shared hard drives on our network. Will there be problems when the exe file accessed by multiple users at the same time?
On the general, yes it can.
On the specific, and as mentioned in the comments by others, what then remains to be asked is
what the application does.
if there is any user-specific functionality or dependency.
if the application can handle concurrency for reads and writes/updates on a DB or file-level(depending on its data sources)

Automatically parallelize a .net application [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
I would like to know if there is a way to automatically parallelize a .Net application in order to use multi core CPU.
I know if it's possible to do it with some coding, but, is there a tools or a "runtime?" that is able to run an application in parallel (multi threading) without do manually ?
Thanks a lot :)
No - there is no way to parallelize a .net application. The programmer must build for multi-threaded/parallel from the ground up, and certain application areas will not be suited to parallelization.

cronjob in asp c# [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I have a question:
I have to do a project, which has something to do with reading data from txt into MSSQL. This function I solved it with a click-event. Right now, the reading process has to read the whole data automatically every day on the server, even without open the website. Can I do it with a cronjob or there are also other better solutions?
Have a look at Quartz.Net - it's a decent job-scheduling system.
It's probably overkill if you only have a single job.
Quickstart documentation is here: http://www.quartz-scheduler.net/documentation/quartz-2.x/quick-start.html
In addition to Quartz.NET you can also look at http://hangfire.io/.

Categories

Resources