Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Field passing
Message
De
15/02/2006 12:26:43
 
 
À
15/02/2006 12:07:00
Information générale
Forum:
ASP.NET
Catégorie:
ADO.NET
Titre:
Divers
Thread ID:
01096481
Message ID:
01096525
Vues:
15
I get the compile error when I call the method. Is there something different to do when passing an array as a parameter?

Here's the code I have now:
// server is defined elsewhere and is working just fine. One row is returned in ds
DataSet ds = server.GetDemoByPk(100);

// Two errors occur on the next line
ArrayList dso = ConvertField(ds.Tables["Demo"].Rows[0][10]);

// ConvertField is defined in the same class as the above code
ArrayList ConvertField(byte[] theData)
{
  ArrayList result = new ArrayList();
  return result;
}
Error 1:
The best overload method match for 'ConvertField(byte[])' has some invalid arguments.

Error 2:
Argument '1': cannot convert from 'object' to 'byte[]'

I tried casting the field to byte[], then got the following error on the same line:
An object reference is required for the nonstatic field, method, or property 'ConvertField(byte[])'

>And what line gives you the error message?
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform