当前位置:网站首页>asp. Net read TXT file
asp. Net read TXT file
2022-07-05 13:37:00 【Bailu-】
One . read
string txt = System.IO.File.ReadAllText("*** Absolute path ***/onNumber.txt");
Two . Write
System.IO.File.WriteAllText("*** Absolute path ***/onNumber.txt", (Convert.ToInt32(txt) + 1) + "");
// Here is simply converting the data to numeric type and then adding 1, The front is the absolute path to read the content , Next is the data to be written
3、 ... and . follow-up
To create files manually , Or you can make a judgment , When the file does not exist , Create the file
边栏推荐
- Resttemplate details
- DataPipeline双料入选中国信通院2022数智化图谱、数据库发展报告
- #从源头解决# 自定义头文件在VS上出现“无法打开源文件“XX.h“的问题
- 网络安全-HSRP协议
- [深度学习论文笔记]TransBTSV2: Wider Instead of Deeper Transformer for Medical Image Segmentation
- 同事半个月都没搞懂selenium,我半个小时就给他整明白!顺手秀了一波爬淘宝的操作[通俗易懂]
- 山东大学暑期实训一20220620
- STM32 reverse entry
- “百度杯”CTF比赛 九月场,Web:SQL
- asp.net 读取txt文件
猜你喜欢

Summit review | baowanda - an integrated data security protection system driven by compliance and security

Lb10s-asemi rectifier bridge lb10s

峰会回顾|保旺达-合规和安全双驱动的数据安全整体防护体系

Win10——轻量级小工具

【每日一题】1200. 最小绝对差

Idea设置方法注释和类注释

Word document injection (tracking word documents) incomplete

STM32 reverse entry

百度杯”CTF比赛 2017 二月场,Web:爆破-2

A detailed explanation of ASCII code, Unicode and UTF-8
随机推荐
JPA规范总结和整理
jenkins安装
Could not set property ‘id‘ of ‘class XX‘ with value ‘XX‘ argument type mismatch 解决办法
使用Dom4j解析XML
Parsing XML using Dom4j
What are the private addresses
How to apply the updated fluent 3.0 to applet development
Go string operation
Shu tianmeng map × Weiyan technology - Dream map database circle of friends + 1
Go pointer
js判断数组中是否存在某个元素(四种方法)
DataPipeline双料入选中国信通院2022数智化图谱、数据库发展报告
go 数组与切片
Summary and arrangement of JPA specifications
go map
MATLAB论文图表标准格式输出(干货)
Datapipeline was selected into the 2022 digital intelligence atlas and database development report of China Academy of communications and communications
Word document injection (tracking word documents) incomplete
redis6主从复制及集群
go 字符串操作