|
by: Vladimir Bezugliy |
last post by:
I have a server that listen a socket.
And I have next client:
TcpClient socketForServer = new TcpClient("IVBEZUGLIY", 21000);
NetworkStream networkStream = socketForServer.GetStream();
StreamWriter streamWriter = new StreamWriter(networkStream);
streamWriter.Write("Hello12345!!!");
streamWriter.Flush();
//streamWriter.Close();
|
by: Daniel |
last post by:
System.IO.StreamWriter Close or Flush method to shut down the computer in
such a way that just part of the file is written? or an empty file is
written? Also if the Close or Flush is to a streamwriter writing to a
network share, is it possible for the network to go down in such a way that
the tartet file is only partialy written? or are there some kind of check
sums to prevent this.
|
by: José Joye |
last post by:
I have 2 threads using the same StreamWriter (obtained from
FileInfo.AppendText).
This first thread will always use the WriteLine() method and the second
thread will always use the Flush() method.
At the present, I have protected the access to the StreamWriter using a
Lock() section.
Is this really particular case, is this necessary?
What could be the implication if I remove the Lock() section?
|
by: ASP Yaboh |
last post by:
I am using StreamWriter's .Writeline() method to create a simple text file. I
found that ASCII characters 255 & 254 are being inserted as the first two
characters of the file which causes a 3rd-party users' parser to fail. It is
not being inserted by my data as the first line starts with "LOGIN: ", i.e.
hard-coded.
Has anyone else encountered this? Is there any filtering settings I can
apply? I looked through the documentation on
|
by: andpapas |
last post by:
In my multi-threaded application i'm getting to a point where I've got
the exception bellow:
------------------------------------------------------------------------
System.ObjectDisposedException: Cannot write to a closed TextWriter.
Server stack trace:
at System.IO.__Error.WriterClosed()
at System.IO.StreamWriter.Flush(Boolean flushStream, Boolean
flushEncoder)
at System.IO.StreamWriter.Write(Char buffer, Int32 index, Int32
|
|
by: Max Powers |
last post by:
Hello, I have a VB.NET code that creates a StreamWriter file first and
then it does a series of procedures that write lines for this
StreamWriter. When all the procedures are done, the StreamWriter is
flushed and closed and all the lines get written to the text.
However, if for some reason one of the procedures fails. The
StreamWriter doesn't write anything at all and the file ends up empty.
Is there a way to save (or actually write)...
|
by: Heron |
last post by:
Hi,
Could someone explain me why the following code doesn't work? The
memorystream always remains with length 0.
MemoryStream input = new MemoryStream();
|
by: =?Utf-8?B?TWlrZQ==?= |
last post by:
Hi. I'm building an ASP.NET site which is hosted on a remote server. When I
try to create a new file using StreamWriter I must specify the drive location
where the file will be saved. I don't have file access anywhere on the
remote server, and therefore I can't figure out how I can create a file. Is
it possible to utilize StreamWriter to create a new file and somehow display
it for the user to save, without actually saving the file...
|
by: fniles |
last post by:
If I use TextWriter synchronized method like below codes if another thread
is trying to write at the same time, what will happen ? Will it the 2nd
thread request to write to the file be queued ? Will the 2nd thread then
stop processing other codes while waiting to write to this file ?
Thank you.
Dim swLogOrig As StreamWriter
Dim swLog As TextWriter
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
|