public void compiliate(ref Compilator cmp, ref TextBox data, ref TextBox code) { bool suc = true; cmp = new Compilator(); TextRange textRange = new TextRange(editor.Document.ContentStart, editor.Document.ContentEnd); try { cmp.Compilate(textRange.Text); } catch (CompilationException ex) { suc = false; } if (suc == true) { data.Text = cmp.mem.output; code.Text = cmp.GetCode(); } }