This is my method. This "sr.ReadToEnd" gives an error. "Argument 1: Cannot covert from group method to bool". It suggest that "ReadToEnd" tchange to "ReadToEndAsync". But it also gives me the same error. I am novel to C#. SO I want to know,
What is group method?
Why this gives me that error?
What is the difference between "ReadToEnd" and "ReadToEndAsync"
<pre>
private static void TestExceptionHandling()
{
StreamReader sr = null;
try
{
sr = File.OpenText(@"E:\4th(Final) Year\LastSemester\SM\Alternatives1_2.docx");
Console.WriteLine(sr.ReadToEnd);
}
catch (FileNotFoundException FNF)
{
Console.WriteLine(FNF.Message);
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
}