Answers for "c# read file store in String"

C#
0

c# read file store in String

using System;
using System.IO;
 
public class Example
{
    public static void Main()
    {
        string fileName = @"C:\some\path\file.txt";
 
        string text = File.ReadAllText(fileName);
        Console.WriteLine(text);
    }
}
 
Posted by: Guest on September-21-2020

C# Answers by Framework

Browse Popular Code Answers by Language