Code: Writing Text to a File (Visual Basic)

王朝c#·作者佚名  2006-12-17
窄屏简体版  字體: |||超大  

This example writes a string to a text file using the WriteLine method of the StreamWriter class.

This example requires:

A reference to System namespace. The following conditions may cause an exception:

The file exists and is read-only (IOException Class). The disk is full (IOException Class). The pathname is too long (PathTooLongException Class). Access Control). If the file already exists, the application needs only Write access, a lesser privilege. Where possible, it is more secure to create the file during deployment, and only grant Read access to a single file, rather than Create access for a folder.

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
 
 
© 2005- 王朝網路 版權所有 導航