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

x
?
Solved

i would like to make visible ...

Posted on 2008-06-22
7
Medium Priority
?
240 Views
Last Modified: 2010-04-15
i would like to make visible the containings of ...

object sender
and...
EventArgs e

in my voyage to better understand what i'm actualy doing.


kind regards
private void OpenWindowButto_Click(object sender, EventArgs e)
        {
 
        }

Open in new window

0
Comment
Question by:Natural_Demon
  • 3
  • 2
  • 2
7 Comments
 
LVL 13

Assisted Solution

by:josgood
josgood earned 400 total points
ID: 21842825
The easiest way is probably to set a breakpoint on OpenWindowButto_Click, run the program so that the breakpoint is hit, and then view these objects with the debugger.

To view, place the mouse cursor over the object, right click, and select QuickWatch.
0
 

Author Comment

by:Natural_Demon
ID: 21842841
but, i mean via the code it self.
and print it out in a textbox.


regards



0
 
LVL 55

Assisted Solution

by:Jaime Olivares
Jaime Olivares earned 400 total points
ID: 21842853
there is nothing useful in this event IMHO,
sender allways be a reference to the button control that generates the event, usually no mistery here, unless several buttons point to the same event.
e contains basically nothing.
 
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 13

Expert Comment

by:josgood
ID: 21842879
You could
         MessageBox.Show(string.Format("{0}\n{1}",sender.ToString(), e.ToString()));
but, as jaime says, that isn't very interesting.

0
 

Accepted Solution

by:
Natural_Demon earned 0 total points
ID: 21842937
wel, i didn't ment the button_click event, but in genral.
i'm a noob and sometimes i cause a erro with this and not being beabled to find a solution
: )
0
 
LVL 55

Expert Comment

by:Jaime Olivares
ID: 21843190
A messagebox is a good technique to debug, as josgood example. It is my favorite debugging method.
Also you can ouput anything directly to the VisualStudio debug window by using:

System.Diagnostics.Debug.WriteLine( similar to messagebox here );
0
 

Author Comment

by:Natural_Demon
ID: 21857629
i always use debug lines, always, that why i asked this question.


thank u all
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
High user turnover can cause old/redundant user data to consume valuable space. UserResourceCleanup was developed to address this by automatically deleting user folders when the user account is deleted.
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…

782 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