[英]How to read a data from a csv file and write that data to certain rows in a new csv file
我想讀取一個文件,然后寫入另一個文件中的某些列
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;
namespace ConsoleApplication2
{
class Program
{
static void Main(string[] args)
{
try
{
using (StreamWriter sw = new StreamWriter("AEJoinerDataTemplate.csv"))
// using streamwriter to write to a text file
using (StreamReader sr = new StreamReader("AutoEnrolment.csv"))
// using streamreader to read a text file
{
while ((txtline = sr.ReadLine()) != null)
{
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.