Home > Net >  Call control problem in the class files
Call control problem in the class files

Time:10-20

Defines a class MyArray on, saved to a separate file, richTextBox1 controls in Form1. Cs file, belongs to a project in the same namespace in two separate files, in the class wrote the following statement:
Foreach (string I in v1. Numbers) {Form1. RichTextBox1. Text=I; }
Compiler cannot pass, showed that gravity error CS0122 inaccessible "Form1. RichTextBox1", because it has a certain level of protection
How do I use richTextBox1 controls in class files?

CodePudding user response:

Is this meaning? As for the second time to see the problem

  •  Tags:  
  • C#
  • Related