当前位置:网站首页>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
边栏推荐
猜你喜欢

Could not set property 'ID' of 'class xx' with value 'XX' argument type mismatch solution

Write macro with word

Flutter 3.0更新后如何应用到小程序开发中

Backup and restore of Android local SQLite database

FPGA learning notes: vivado 2019.1 add IP MicroBlaze

先写API文档还是先写代码?

go 数组与切片

Godson 2nd generation burn PMON and reload system

Write API documents first or code first?

A detailed explanation of ASCII code, Unicode and UTF-8
随机推荐
“百度杯”CTF比赛 九月场,Web:Upload
程序员成长第八篇:做好测试工作
Flutter InkWell & Ink组件
Matlab paper chart standard format output (dry goods)
A detailed explanation of ASCII code, Unicode and UTF-8
#从源头解决# 自定义头文件在VS上出现“无法打开源文件“XX.h“的问题
Record in-depth learning - some bug handling
49. Grouping of alphabetic ectopic words: give you a string array, please combine the alphabetic ectopic words together. You can return a list of results in any order. An alphabetic ectopic word is a
Android本地Sqlite数据库的备份和还原
关于 Notion-Like 工具的反思和畅想
Solve the problem of "unable to open source file" xx.h "in the custom header file on vs from the source
leetcode 10. Regular Expression Matching 正则表达式匹配 (困难)
面试官灵魂拷问:为什么代码规范要求 SQL 语句不要过多的 join?
MySQL - database query - sort query, paging query
Win10 - lightweight gadget
How to choose note taking software? Comparison and evaluation of notion, flowus and WOLAI
一文详解ASCII码,Unicode与utf-8
MMSeg——Mutli-view时序数据检查与可视化
龙芯派2代烧写PMON和重装系统
Write macro with word