Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Windows.Forms;
- namespace WindowsFormsApplication2
- {
- public partial class Form1 : Form
- {
- public Form1()
- {
- InitializeComponent();
- }
- public class anweisung
- {
- public string text = "";
- public object[] refs;
- public anweisung(string text)
- {
- this.text = text;
- }
- public void setrefs(ref object[] child)
- {
- foreach(object obj in child)
- {
- refs[refs.Length] = obj;
- }
- }
- }
- private void button2_Click(object sender, EventArgs e)
- {
- anweisung anweisung1 = new anweisung("anw1");
- anweisung anweisung2 = new anweisung("anw2");
- anweisung1.setrefs(ref anweisung2);
- textBox1.Text = anweisung1.text;
- textBox2.Text = anweisung1.refs[0]... // wie komme ich hier auf "text" von "anweisung2"?
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement