read text file and store in string c# code example
Example: 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);
}
}