Advertisement
Guest User

Untitled

a guest
Nov 26th, 2014
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. public partial class Form1 : Form {
  2. public Form1() {
  3. InitializeComponent();
  4. propertyGrid1.SelectedObject = testObject;
  5. }
  6.  
  7. private void button1_Click(object sender, EventArgs e) {
  8. MessageBox.Show(testObject.Bar.Number.ToString());
  9. }
  10.  
  11. private Example testObject = new Example();
  12. }
  13.  
  14. class Example {
  15. public int Foo { get; set; }
  16. public Widget Bar { get; set; }
  17. public Example() {
  18. Bar = new Widget();
  19. }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement