RIGHT THEN

RIGHT THEN

  • NA
  • 27
  • 0

Object of type 'System.Int32' cannot be converted to type 'System.Object[]'

Jan 30 2008 2:11 AM
GentleMen

Object of type 'System.Int32' cannot be converted to type 'System.Object[]'.
Is The Error I am Getting In c#.
I need Immediate Remedy Please

class SomeClass
{

public delegate void SomeDel ( params object[] Params_list );

public void SomeFunc(params object[] Params_List)
{
  // Updates Value Of Some Treeview According To Value Recieved
}

public void SomeThreadFunc()
{
   SomeDel a ;

   a = SomeFunc ;

   object[] Params_List = new object[1];

   Params_List.setvalue(0,1);

   this.invoke( a, Params_List); // Here Is Where Comes The Error
                                 // Althou i Have Tried new object[] {1}
                                 // but with no respite
  
}
 
}



It Compiles Well But While Runing It Creates Problems
what am i doing wrong how to go about it

Thankyou
RIGHT_THEN

Answers (7)