Arijeet Ghosh

Arijeet Ghosh

  • NA
  • 210
  • 37.1k

how to return a function value from one class to another ?

Feb 4 2021 10:13 AM
i have returned an array from a function defined in one class to another but the values are missing . the code is:-
 
class a
{
        private string[,,,] allcontrols{...function body ...}
        public string head=>allcontrols().clone();
 
      private void btn1_click(.......)
      {
            string[,,,] cl= allcontrols();
            messagebox.show(cl[0,1,0,0]);    ///the value is shown ....
      }
}
 
class b
{
      public static void main(.......) 
        { 
        a aa=new a(); 
       string[,,,]hh= aa.head;
       var str =hh.getvalue(0,1,0,0) .tostring();
       messagebox.show(str);
      } 
 
 
//how to get values ...... 

Answers (1)