From 6a21eb789cd47f1d91d421de5855205bfe93738d Mon Sep 17 00:00:00 2001 From: citizen-VM Date: Sun, 23 Aug 2020 17:00:08 +0200 Subject: [PATCH] refactor: edited the nualph creation section --- main_form.cs | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/main_form.cs b/main_form.cs index 2c11182..75e626a 100644 --- a/main_form.cs +++ b/main_form.cs @@ -100,13 +100,16 @@ namespace KRY_0x01_ng TextBox tb_pruned_k = textBox2; TextBox tb_nualph = textBox3; tb_pruned_k.Text = str_to_check; - nualphabet = alphabet.Except(str_to_check.ToArray()).ToArray(); - string nualph_str = ""; - for (int i = 0; i < nualphabet.Length; i++) + char[] transient_alph = new char[25]; + transient_alph = alphabet.Except(str_to_check.ToArray()).ToArray(); + string transientalph_str = ""; + for (int i = 0; i < transient_alph.Length; i++) { - nualph_str += nualphabet[i]; + transientalph_str += transient_alph[i]; } - tb_nualph.Text = str_to_check + nualph_str; + string nualph_str = str_to_check + transientalph_str; + tb_nualph.Text = nualph_str; + nualphabet = nualph_str.ToCharArray(); return; }