当前位置:网站首页>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
边栏推荐
- Datapipeline was selected into the 2022 digital intelligence atlas and database development report of China Academy of communications and communications
- MySQL --- 数据库查询 - 排序查询、分页查询
- Although the volume and price fall, why are the structural deposits of commercial banks favored by listed companies?
- French scholars: the explicability of counter attack under optimal transmission theory
- 时钟周期
- AVC1与H264的区别
- 记录一下在深度学习-一些bug处理
- 【 script secret pour l'utilisation de MySQL 】 un jeu en ligne sur l'heure et le type de date de MySQL et les fonctions d'exploitation connexes (3)
- 【Hot100】34. Find the first and last positions of elements in a sorted array
- With 4 years of working experience, you can't tell five ways of communication between multithreads. Dare you believe it?
猜你喜欢
MySQL --- 数据库查询 - 排序查询、分页查询
龙芯派2代烧写PMON和重装系统
"Baidu Cup" CTF competition in September, web:sql
Word document injection (tracking word documents) incomplete
一网打尽异步神器CompletableFuture
Operational research 68 | the latest impact factors in 2022 were officially released. Changes in journals in the field of rapid care
FPGA 学习笔记:Vivado 2019.1 添加 IP MicroBlaze
Jenkins installation
Cloudcompare - point cloud slice
Nantong online communication group
随机推荐
Binder通信过程及ServiceManager创建过程
FPGA 学习笔记:Vivado 2019.1 添加 IP MicroBlaze
SAE international strategic investment geometry partner
Integer ==比较会自动拆箱 该变量不能赋值为空
今年上半年,通信行业发生了哪些事?
MySQL get time
山东大学暑期实训一20220620
mysql econnreset_ Nodejs socket error handling error: read econnreset
leetcode 10. Regular Expression Matching 正则表达式匹配 (困难)
ASEMI整流桥HD06参数,HD06图片,HD06应用
Address book (linked list implementation)
Redis6 master-slave replication and clustering
My colleague didn't understand selenium for half a month, so I figured it out for him in half an hour! Easily showed a wave of operations of climbing Taobao [easy to understand]
私有地址有那些
CAN和CAN FD
面试官灵魂拷问:为什么代码规范要求 SQL 语句不要过多的 join?
一文详解ASCII码,Unicode与utf-8
Cloudcompare - point cloud slice
French scholars: the explicability of counter attack under optimal transmission theory
[notes of in-depth study paper]uctransnet: rethink the jumping connection in u-net from the perspective of transformer channel