Hi guys
Lets say I have a application with these three items:
A startup form called form1
A class lets say Class1
A class lets say Class2
How can I access a method in class2 from whitin class1?
For example in Class2 I have a method call AddToDatabase(sql as string) and in a method is Class1 I have a SQL statement that I want to implement.
Solution that didn't work:
Lets say I have a application with these three items:
A startup form called form1
A class lets say Class1
A class lets say Class2
How can I access a method in class2 from whitin class1?
For example in Class2 I have a method call AddToDatabase(sql as string) and in a method is Class1 I have a SQL statement that I want to implement.
Solution that didn't work:
- Initializing an instance of Class2 in form1 called myClass2 and trying to reach it using: form1.myClass2
- Initializing an instance of Class2 in New subrotine of Class1 and trying to call it through: myClass2