✅ .NET 9.0 | CSharp - WinForms | Encryption & Button Function Issue

Having a minor issue when trying to encrypt a file. This is my exception error that was thrown: Error: Method or operation is not implemented Here is my button call code:
private async void ButtonEncrypt_Click(object sender, EventArgs e)
{
try
{
string path = TextboxFilePath.Text;
System.Windows.Forms.ProgressBar Bar = progressBar;
System.Windows.Forms.TextBox Status = this.progressStatus;

await fileEncrypterHelper.EncryptPath(path, progressBar, Status);
}
catch (Exception ex)
{
TextboxError.Visible = true;
TextboxError.Text = $"Error: {ex.Message}";
}
}

private async void ButtonDecrypt_Click(object sender, EventArgs e)
{
try
{
string path = TextboxFilePath.Text;
System.Windows.Forms.ProgressBar Bar = progressBar;
System.Windows.Forms.TextBox Status = this.progressStatus;


await fileEncrypterHelper.DecryptPath(path, progressBar, Status);
}
catch (Exception ex)
{
TextboxError.Visible = true;
TextboxError.Text = $"Error: {ex.Message}";
}
}
private async void ButtonEncrypt_Click(object sender, EventArgs e)
{
try
{
string path = TextboxFilePath.Text;
System.Windows.Forms.ProgressBar Bar = progressBar;
System.Windows.Forms.TextBox Status = this.progressStatus;

await fileEncrypterHelper.EncryptPath(path, progressBar, Status);
}
catch (Exception ex)
{
TextboxError.Visible = true;
TextboxError.Text = $"Error: {ex.Message}";
}
}

private async void ButtonDecrypt_Click(object sender, EventArgs e)
{
try
{
string path = TextboxFilePath.Text;
System.Windows.Forms.ProgressBar Bar = progressBar;
System.Windows.Forms.TextBox Status = this.progressStatus;


await fileEncrypterHelper.DecryptPath(path, progressBar, Status);
}
catch (Exception ex)
{
TextboxError.Visible = true;
TextboxError.Text = $"Error: {ex.Message}";
}
}
Here is the code for everything in my FileEncrypterHelper.cs:
10 Replies
ero
ero2w ago
what is throwing the error?
Gυαɾԃιαɳ
GυαɾԃιαɳOP2w ago
When I click the button Encrypt. it throws the error
ero
ero2w ago
what is throwing the error?
Gυαɾԃιαɳ
GυαɾԃιαɳOP2w ago
I have no clue.
Jimmacle
Jimmacle2w ago
the stack trace will tell you that's part of the error
Gυαɾԃιαɳ
GυαɾԃιαɳOP2w ago
Oh yeah, I forgot well. The stack trace doesnt show cause it only shows the error in a textbox not the messagebox ui
Jimmacle
Jimmacle2w ago
then fix your code so you can use the actual debugger to investigate
Gυαɾԃιαɳ
GυαɾԃιαɳOP2w ago
oki, ill check in with that. If I need more help ill come back here.
Jimmacle
Jimmacle2w ago
don't eat exceptions and only display partial information in the ui
Gυαɾԃιαɳ
GυαɾԃιαɳOP2w ago
ok
Want results from more Discord servers?
Add your server