473,406 Members | 2,816 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Writing to a file on server

I want a link to a nice documentation about writing to a server file by C#
using System.IO; .
Nov 19 '05 #1
1 1316
Is it that the documentation sample is unsuitable:

http://msdn.microsoft.com/library/de...classtopic.asp

using System;
using System.IO;

class TextRW
{
static void Main()
{
TextWriter stringWriter = new StringWriter();
using(TextWriter streamWriter =
new StreamWriter("InvalidPathChars.txt"))
{
WriteText(stringWriter);
WriteText(streamWriter);
}

TextReader stringReader =
new StringReader(stringWriter.ToString());
using(TextReader streamReader =
new StreamReader("InvalidPathChars.txt"))
{
ReadText(stringReader);
ReadText(streamReader);
}
}

static void WriteText(TextWriter textWriter)
{
textWriter.Write("Invalid file path characters are: ");
textWriter.Write(Path.InvalidPathChars);
textWriter.Write('.');
}

static void ReadText(TextReader textReader)
{
Console.WriteLine("From {0} - {1}",
textReader.GetType().Name, textReader.ReadToEnd());
}
}
"Bishoy George" <bi****@bishoy.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
I want a link to a nice documentation about writing to a server file by C#
using System.IO; .

Nov 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: JC | last post by:
I am using Mysql version: 4.0.18-max-log and trying to populate a database from a text file using source option from inside the mysql environment. The population run OK but when creating the...
1
by: T.S.Negi | last post by:
Dear All, Please suggest some of the best practices for writing SQL server stored procedures? I'm writing a business function (stored procedure), which calls many-stored procedure one after...
3
by: swingingming | last post by:
Hi, for 5 weeks, I finished my mdb project. Thanks to all you guys. Now, I would like to put it on a server then 5-6 people can share it. I heard about the splitting back-end database, put it on a...
3
by: Doug | last post by:
I have a split Access database that resides on a file server. The file server is a restricted drive that only people with the correct permissions can browse to this directory on the LAN. Several...
2
by: lawrence | last post by:
I have a web server running IIS pointing to a file server. Should the ..NET framework be installed on both the web server and the file server? Right now I have it installed on only the web...
1
by: Matt Hamilton | last post by:
I was hoping that someone can give me step-by-step instructions to fix the following: We would like our ASP.NET application to utilize a central file server for uploads and downloads. I have...
4
by: RLN | last post by:
Re: Access 2003/WinXP Pro-SP3 I have a shell command that does not run correctly. I have two programs located on a file server: Pgm1.mdb and Pgm2.mdb Pgm1 launches Pgm2 via a command button...
9
by: TC | last post by:
Like a lot of database developers, I often choose Jet for the back- end. I'm starting to worry about what will happen when Jet is deprecated. Ostensibly, Jet users like me must switch to SQL Server...
1
by: Mr fahad | last post by:
#include <stdio.h> #include <conio.h> void main (void) { char ch; FILE *fp; fp=fopen ("fahd.txt","w"); while (ch=fgetc( )!='\r') fputc (ch,fp); fclose (fp);
0
harshadd
by: harshadd | last post by:
Dear all, I am trying to install File server Resource Manager to apply user level directory quota. Tried to use this link for help , it is as below: I checked the GIF file But on my...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
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,...
0
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...
0
jinu1996
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...
0
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.