string holder = richTextBox1.Selection.Text;
The .Selection
produces an error :
'System.Windows.Forms.RichTextBox' does not contain a definition for 'Selection' and no extension method 'Selection' accepting a first argument of type 'System.Windows.Forms.RichTextBox' could be found (are you missing a using directive or an assembly reference?).