hi everyone! ))
As I understand it - to a class B inherit fields and methods of class A must describe them in this order -
public class A
{
public method34()
{
int m = 34;
}
public class B
{
private int my_m;
public method1()
{
int m = 1;
}
public method2()
{
int m = 2;
}
}
}
Сan I can then use similar code in other code file -
namespace TruckingProject
{
public partial class MainForm1 : Form
{
public MainForm1()
{
InitializeComponent();
B bb = new B();
If (a<0) B.method34;
}
}
if not - what should I change? (may be -should add something to the namespace)
Thanks for you answers )