What causes this error?

  • Thread starter Thread starter Carl Sadlier
  • Start date Start date
C

Carl Sadlier

"denotes a 'field' where a 'class' was expected" I am a VB
programmer trying to learn Visual C#.
 
Carl Sadlier said:
"denotes a 'field' where a 'class' was expected" I am a VB
programmer trying to learn Visual C#.

I can't remember exactly the situations where that might come up, but
if you post an example we can try to explain what it means.
 
Carl,

Can you post the "code snipet" that causes the error? Sounds like a syntax
problem to me but it would be better to see it.

regards,

MArco
 
Hi Carl,


IIRC this error usually happen in a "new " assignment like this:

DropDownList drop = new dropdownlist ();

if it happen that the class has a field named "dropdownlist" the compiler
will give you that error.

It has happen to me before, only that as Jon's said I dont recall other
place where it may happen , if you are lucky you have to above scenario :)

Merry X-Mas,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top