string fullPathname = openFileDialog.FileName;
FileInfo src = new FileInfo(fullPathname);
fileName.Text = src.Name;
source.Clear();
using (TextReader reader = new StreamReader(fullPathname))
{
string line;
while ((line = reader.ReadLine()) != null)
{
source.Text += line + "\n";
}
}
public static void RefValue(ref int param)
{
param = 42;
}
public static void OutValue(out int param)
{
param = 43;
}
int i = 0;
Pass.RefValue(ref i);
Console.WriteLine(i);//42
int j = 0;
Pass.OutValue(out j);
Console.WriteLine(j);//43