Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

dafsd

Posted on 2015-02-12
2
Medium Priority
?
55 Views
Last Modified: 2015-02-13
I'm writing my first  C#  program in Microsoft Visual C# 2010.  From "New Project" window I select "Visual C#", Windows Forms Application.  I create two buttons.  When I double-click first button, it opens up source code window.  I write one line of source code which also propagates to button 2's source code.  

Why ?

I want both buttons to be independent of each other.  Adding code for button 1 shouldn't appear in button 2's source code.
0
Comment
Question by:naseeam
2 Comments
 
LVL 20

Accepted Solution

by:
jmcg earned 2000 total points
ID: 40606949
Are you expecting a separate source file for each button? Usually, there's just one source file per form and the code for each widget, button, etc will appear in that source file, regardless of which control you click on to visit the source file. Code that you add specific for a button should not be getting duplicated to the other button.

You want to post a code sample to show what you're seeing?
0
 
LVL 1

Author Closing Comment

by:naseeam
ID: 40607903
Thank you!
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
Integration Management Part 2
Screencast - Getting to Know the Pipeline
Suggested Courses

886 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question