🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.pl.comp.lang.csharp
Article #22190

Re: znow sie pogubilem

#22190
From: qaz
Date: Tue, 07 Jun 2011 07:00
36 lines
2309 bytes
Użytkownik "Maciej Rychter" <rychter.maciej@gmail.com> napisał w wiadomości 
news:61a8bb4d-9345-4a5a-a1d5-ca0351595fe2@e35g2000yqc.googlegroups.com...
> Coś tu mocno namieszałeś.
> Trochę to przeredaguje żeby to miało większy sens:
>
> <kod>
>
> public partial class form1 : Form
> {
>  public string psWk { get; private set; }  //usunięte "static"
>
>  public form1()
>  {
>   InitializeComponent();
>  }
>
>  private void bOk_Click(object sender, EventArgs e)
>  {
>  psWk = this.tbIden.Text;        //zamiast "this" - "form1"
>  this.Close();
>  }
>
> </kod>

teraz edytor (i kompilator) sygnalizują błąd w form2

private void button1_Click(object sender, EventArgs e)
{
Form kl = new form1();
kl.ShowDialog();
this.textBox1.Text = form1.psWk;
}

Error 2 An object reference is required for the non-static field, method, or 
property 'iFV.form1.psWk.get' ...
Technical Details
Message-ID: <4dedcc87$0$2459$65785112@news.neostrada.pl>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!news.nask.pl!news.nask.org.pl!news.unit0.net!news.glorb.com!npeer03.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!nx01.iad01.newshosting.com!newshosting.com!newsfeed.neostrada.pl!unt-exc-01.news.neostrada.pl!unt-spo-b-01.news.neostrada.pl!news.neostrada.pl.POSTED!not-for-mail
References: <4de88723$0$2440$65785112@news.neostrada.pl> <f0d2b8ca-4ff0-44bc-a255-bc7e72ee7eb7@s2g2000yql.googlegroups.com> <4de8b4ad$0$2497$65785112@news.neostrada.pl> <f86bf68d-f9ee-4c03-b0a7-bfb9411474b7@y12g2000yqh.googlegroups.com> <4dec8f29$0$2439$65785112@news.neostrada.pl> <4dec9398$0$2486$65785112@news.neostrada.pl> <61a8bb4d-9345-4a5a-a1d5-ca0351595fe2@e35g2000yqc.googlegroups.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!news.nask.pl!news.nask.org.pl!news.unit0.net!news.glorb.com!npeer03.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!nx01.iad01.newshosting.com!newshosting.com!newsfeed.neostrada.pl!unt-exc-01.news.neostrada.pl!unt-spo-b-01.news.neostrada.pl!news.neostrada.pl.POSTED!not-for-mail
From: "qaz" <qazvox29a@wp.pl>
Newsgroups: alt.pl.comp.lang.csharp
References: <4de88723$0$2440$65785112@news.neostrada.pl> <f0d2b8ca-4ff0-44bc-a255-bc7e72ee7eb7@s2g2000yql.googlegroups.com> <4de8b4ad$0$2497$65785112@news.neostrada.pl> <f86bf68d-f9ee-4c03-b0a7-bfb9411474b7@y12g2000yqh.googlegroups.com> <4dec8f29$0$2439$65785112@news.neostrada.pl> <4dec9398$0$2486$65785112@news.neostrada.pl> <61a8bb4d-9345-4a5a-a1d5-ca0351595fe2@e35g2000yqc.googlegroups.com>
Subject: Re: znow sie pogubilem
Date: Tue, 7 Jun 2011 09:00:20 +0200
MIME-Version: 1.0
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5931
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6090
Lines: 37
Message-ID: <4dedcc87$0$2459$65785112@news.neostrada.pl>
Organization: Telekomunikacja Polska
NNTP-Posting-Host: 83.9.129.92
X-Trace: 1307430023 unt-rea-a-01.news.neostrada.pl 2459 83.9.129.92:1061
X-Complaints-To: abuse@news.neostrada.pl
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit