لطفا راهنمایی کنید اشکال این برنامه کجاست؟
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;

namespace Rextester
{
public class Program
{
public static void Main(string[] args)
{
//Your code goes here
Console.WriteLine("Hello, world!");
}
}
}
#
#using System;
#using System.IO;
#using System.Security.Cryptography;

public class HashDirectory
{
public static void Main(string[] args)
{
if (args.Length < 1)
{
Console.WriteLine(&quot;No directory selected.&quot;);
return;
}

string directory = args[0];
if (Directory.Exists(directory))
{
// Create a DirectoryInfo object representing the specified directory.
var dir = new DirectoryInfo(directory);
// Get the FileInfo objects for every file in the directory.
FileInfo[] files = dir.GetFiles();
// Initialize a SHA256 hash object.
using (SHA256 mySHA256 = SHA256.Create())
{
// Compute and print the hash values for each file in directory.
foreach (FileInfo fInfo in files)
{
using (FileStream fileStream = fInfo.Open(FileMode.Open))
{
try
{
// Create a fileStream for the file.
// Be sure it&#39;s positioned to the beginning of the stream.
fileStream.Position = 0;
// Compute the hash of the fileStream.
byte[] hashValue = mySHA256.ComputeHash(fileStream);
// Write the name and hash value of the file to the console.
Console.Write($&quot;{fInfo.Name}: &quot;);
PrintByteArray(hashValue);
}
catch (IOException e)
{
Console.WriteLine($&quot;I/O Exception: {e.Message}&quot;);
}
catch (UnauthorizedAccessException e)
{
Console.WriteLine($&quot;Access Exception: {e.Message}&quot;);
}
}
}
}
}
else
{
Console.WriteLine(&quot;The directory specified could not be found.&quot;);
}
}

// Display the byte array in a readable format.
public static void PrintByteArray(byte[] array)
{
for (int i = 0; i < array.Length; i++)
{
Console.Write($&quot;{array[i]:X2}&quot;);
if ((i % 4) == 3) Console.Write(&quot; &quot;);
}
Console.WriteLine();
}
}