473,569 Members | 2,463 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

What causes this error?

"denotes a 'field' where a 'class' was expected" I am a VB
programmer trying to learn Visual C#.
Nov 15 '05 #1
5 1158
Carl,

Can you show the code that is causing the error?
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"Carl Sadlier" <an*******@disc ussions.microso ft.com> wrote in message
news:39******** *************** *****@phx.gbl.. .
"denotes a 'field' where a 'class' was expected" I am a VB
programmer trying to learn Visual C#.

Nov 15 '05 #2
Carl Sadlier <an*******@disc ussions.microso ft.com> wrote:
"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.

--
Jon Skeet - <sk***@pobox.co m>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 15 '05 #3
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 "dropdownli st" 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,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
"Carl Sadlier" <an*******@disc ussions.microso ft.com> wrote in message
news:39******** *************** *****@phx.gbl.. .
"denotes a 'field' where a 'class' was expected" I am a VB
programmer trying to learn Visual C#.

Nov 15 '05 #4
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
"Carl Sadlier" <an*******@disc ussions.microso ft.com> wrote in message
news:39******** *************** *****@phx.gbl.. .
"denotes a 'field' where a 'class' was expected" I am a VB
programmer trying to learn Visual C#.

Nov 15 '05 #5
I've also seen it when using wrong class name in ForEach statements.

Marco
"Carl Sadlier" <an*******@disc ussions.microso ft.com> wrote in message
news:39******** *************** *****@phx.gbl.. .
"denotes a 'field' where a 'class' was expected" I am a VB
programmer trying to learn Visual C#.

Nov 15 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
2013
by: bjrnove | last post by:
Hi. Me and a friend have a discussion about main. In my opinion the legal ways of writing main is: int main(void); int main(int,char**); My friend claims that you also have a standard version with enviroment variables like this:
17
1579
by: Radith | last post by:
In follow-up to my previous post; Would any one know how I can intake sentences of text (i.e. With space characters); because scanf("%s") causes input to terminate after a space character. Cheers.
1
1228
by: reom | last post by:
Hi, I'm not sure this is the right place to report bugs in MS Visual C++ .NET 2003. I posted the same message on MSDN forums (http://forums.microsoft.com/msdn/ShowPost.aspx?PostID=95745). In any case, the code below causes the following error: main.cpp(22): fatal error C1001: INTERNAL COMPILER ERROR (compiler file...
1
2978
by: Philipp Schumann | last post by:
In one of my web developments, the Application_End event occurs several times while a user browses the pages. Because I make use of extensive session tracking and also provide a couple of services that need the session state, that is highly problematic as the sessions are abandoned when the application ends. I have observed this behaviour for...
5
1639
by: Eric Sabine | last post by:
the second I add <appSettings> </appSettings> to my web.config file (just after the <system.web>), my web application will no longer run. I get an error that reads: Error while tyring to run projectL Unable to start debugging on the web
6
8938
by: HLady | last post by:
I have been googling and cannot seem to find the answer I seek so I turn to the group. I have an application where I have been receiving 'Thread was being aborted' error ocasionally. In production I have received it at least 3 times in 45 days. It is sporadic. After some searching, I can rule out the most likely suspects. It is NOT...
2
2650
by: Tav | last post by:
this seems to be a very generic error message, and the fact that i have no way of locating what causes the error is frustrating. anyway, i'll be general with my problem. i have a div on my page that contains some information, and i made it like a window, as in it can be maximized and closed by javascript functions in the page. the function...
5
12281
by: Neil Rossi | last post by:
I have an issue with a particular ASP page on two web servers. Let's call these servers Dev1 and Beta1. Both Servers are running IIS 5, Windows 2000 SP4 with "almost" all of the latest patches. On Beta1, I am able to execute a particular page with no problem, that page opens up in the comes up just fine. On Win2kdev1, when I go to...
11
3280
by: Shawn Yates | last post by:
I downloaded TimeLines.zip from (http://www.mvps.org/access/reports/rpt0018.htm) and I think I found a bug in it but I can't seem to fix it. When you open this go to the table and enter a new event and put it's start date at like12/01/1999 and the end date at 12/31/1999. Then go to the report and find your new entered event. If it does what...
7
2540
by: semut | last post by:
Given that the string is of null-terminated type. What could be the possible causes (by experience) the string to have no null character (\0) and cause buffer overflow later. I know it is quite broad, just like to find out the causes as much as possible so that I could impose stricter checking toward my codes. note: I could not use...
0
7926
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8132
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7982
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6286
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5514
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5222
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3656
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3644
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2116
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.