TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
sean wang
NA
1
1.6k
An object reference is required for the non-static field,
Jul 13 2015 10:26 AM
I got this compile error
An object reference is reqired for the non-static field, method, or property MainWindow.MainRib
When I do
public static void toggle_visibility()
{
foreach (var ribbonTab in MainRib.Items.OfType<RibbonTab>())
....
}
If I remove static, the error would be gone from here, but it will show up from the caller
MainWindow.toggle_visibility(). I can create an instance for the class MainRib, but then
that is not the instance I want to modify. So the question is how to modify MainRib
outside of the class?
Reply
Answers (
0
)
HOW TO CREATE SETUP IN VISUAL STUDIO 2012 WITH DATABASE
Stopping execution of function on Button Click ??