I have been handed a project that someone else started and most of it was
developed in the VS.NET design mode. For whatever reasons, when I try to
make changes to the controls in VS.NET design mode, I suddenly get a ton of
these errors:
cs(1189): 'class.form.checkedListBox1' denotes a 'field' where a 'class' was
expected
I was not getting any errors until I made a couple of changes within VS.NET.
So I'm trying to understand why these errors are occurring. I need
checkedListBox1 to be nonstatic, but I also need to be able to access it
from a static method. Any clues to this or why the compiler bugs out after
making changes in design mode would be greatly appreciated.
Chris
John Eikanger [MSFT] - 05 Apr 2004 23:50 GMT
Hi, Chris
I see that Ying-Shen Yu has responded to a duplicate of this post in
microsoft.public.dotnet.framework.windowsforms. Please check for your
answer there.
Posting multiple messages in this way is called multi-posting, which is
considered poor manners in the newsgroups and will get you flamed if some
people notice. This is because an answer to one post is not available in
the other. If I answer your question in one thread and it was already
answered in another thread, I've wasted my time. The preferred technique
is called crossposting, which puts linked copies of the same post in
multiple newsgroups.. You can crosspost using Outlook Express or the MSDN
Web interface by explicitly typing the names of the groups (separated by
semi-colons or commas) in the Newsgroup box that appears when you post.
Example: microsoft.public.vb.com;microsoft.public.vb.database.ado etc.
HTH,
John Eikanger
Microsoft Developer Support
This posting is provided ?AS IS? with no warranties, and confers no rights.
(c) 2004 Microsoft Corporation. All rights reserved.
--------------------
| From: "Chris Clement" <noemail@please.com>
| Subject: accessing nonstatic object from static and nonstatic methods
[quoted text clipped - 26 lines]
|
| Chris