Everyone knows that LAN chatInstant Messaging SoftwareIt is the most common thing, so a large number of import of Instant Messaging Software is conducive to LAN chat, feiqiu www.freeeim.com download in determining the ranking of a website, it is necessary not only to analyze the webpage content and structure, but also to analyze the website's instant messaging software. An important factor affecting website rankings is obtaining as many high-quality external instant messaging software as possible, also known as importing instant messaging software.
What is the import of Instant Messaging Software?
Feiqiu's file reading and writing code
File Read operations
Static void main (string [] ARGs)
{
String Path = "";
Console. writeline ("Enter the file name of the file to be read, including the path ");
Path = console. Readline ();
If (! File. exists (PATH ))
{
Console. writeline ("the file does not exist ");
Return;
}
Try
{
Filestream file = new filestream (path, filemode. Open );
Byte [] bt = new byte;
File. Read (BT, 0, BT. Length );
String STR = encoding. Default. getstring (BT );
Console. writeline (STR );
Console. Readline ();
}
Catch (system. Exception E)
{
Console. writeline ("An error occurred while reading the file ");
}
}
File write operations:
Static void main (string [] ARGs)
{
// Filestream fs1 = file. Create ("test1 ");
// Fs1.close ();
// Console. Readline ();
String Path = "";
String content = "";
Console. writeline ("Enter the file name of the file to be saved, including the path ");
Path = console. Readline ();
Console. writeline ("Enter the content to save ");
Content = console. Readline ();
Try
{
Filestream file = new filestream (path, filemode. Create );
Byte [] bt = encoding. utf8.getbytes (content );
File. Write (BT, 0, BT. Length );
File. Flush ();
}
Catch (system. Exception E)
{
Console. writeline ("An error occurred while creating or writing Files ");
}
// Read the file stream
Static void main (string [] ARGs)
{
Console. writeline ("Enter the file name to read, including the path ");
String Path = console. Readline ();
If (! File. exists (PATH ))
{
Console. writeline ("the file does not exist ");
Return;
}
Filestream readstream = new filestream (path, filemode. Open );
Bufferedstream readbuffered = new bufferedstream (readstream );
Byte [] bt = new byte [readbuffered. Length];
Readbuffered. Read (BT, 0, (INT) readbuffered. Length );
Console. writeline (encoding. Default. getstring (BT ));
Readbuffered. Close ();
Console. Readline ();
}