Autor Beitrag
MarcinD
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 34

Windows 7 Ultimate (64Bit)
VS2008 Prof. - C#
BeitragVerfasst: Do 06.01.11 17:28 
Dann kopier Dir das ganze 7 mal, und pass die Namen der Textboxen und Variablen an.

ausblenden C#-Quelltext
1:
2:
3:
4:
double wert1 = Double.Parse(textBox1.Text)
double wert2 = Double.Parse(textBox2.Text)
double result = wert1 * wert2
textBox3.Text = result.ToString()
JoKaBo Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 157



BeitragVerfasst: Do 06.01.11 17:31 
auf dise ide Kommt meien 15 manat alte Schwester :D

dann steht dort nur folgenr Fehler

Eine lokale Variable mit dem Namen "result" ist bereits in diesem Bereich definiert.
MarcinD
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 34

Windows 7 Ultimate (64Bit)
VS2008 Prof. - C#
BeitragVerfasst: Do 06.01.11 17:35 
Alter, willst Du mich fertig machen? :?

Result musst Du auch immer wieder neu vergeben. Also Result für die erste Berechnung, Result2 für die 2te Berechnung usw.
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19314
Erhaltene Danke: 1747

W11 x64 (Chrome, Edge)
Delphi 11 Pro, Oxygene, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Do 06.01.11 17:36 
Oder einfach das double vor der Variablen weg... dann wird die schon deklarierte einfach wiederverwendet bei den folgenden Rechnungen.
JoKaBo Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 157



BeitragVerfasst: Do 06.01.11 17:36 
Dann schreib das doch :D
huuuuuh
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 665
Erhaltene Danke: 19

win xp, (win vista), win 7
VS 2008 Express Edition, VS 2010 Express Edition, VS 2010 Professionell
BeitragVerfasst: Do 06.01.11 17:46 
nun, wir denken nicht komplett für dich. nen bissl musst du schon noch selber tun ;)
MarcinD
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 34

Windows 7 Ultimate (64Bit)
VS2008 Prof. - C#
BeitragVerfasst: Do 06.01.11 18:04 
Oder Du nutzt die Variante: (Musst natürlich wieder für die weiteren 6 Berechnungen anpassen)
ausblenden C#-Quelltext
1:
textBox3.Text = (Double.Parse(textBox1.Text)*Double.Parse(textBox2.Text)).ToString();					
Namenlosnameless
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 259
Erhaltene Danke: 6

Windows XP Home Edition, Windos Vista
C#
BeitragVerfasst: Do 06.01.11 22:36 
wenn ich mir das so durchlese kann ich dir nur zum wiederholten Male sagen:

Lern die Grundlagen! und quäle uns nicht mit deinen Teilweise oft schnippischen Aussagen!

_________________
1:<<Life sucks!!>> 2:<< Well okay>> 1: <<Just Yours>> 2:<<Ohmph>>
Trashkid2000
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 561
Erhaltene Danke: 137



BeitragVerfasst: Do 06.01.11 22:52 
user profile iconNamenlosnameless hat folgendes geschrieben Zum zitierten Posting springen:
wenn ich mir das so durchlese kann ich dir nur zum wiederholten Male sagen:

Lern die Grundlagen! und quäle uns nicht mit deinen Teilweise oft schnippischen Aussagen!
Ja, da kann ich Dir nur Recht geben! Zum einen die schlimmsten Fragen stellen, und dann auch noch frech werden:
user profile iconJoKaBo hat folgendes geschrieben Zum zitierten Posting springen:
auf dise ide Kommt meien 15 manat alte Schwester :D
[an dieser Stelle: ihr müsst ja eine sehr gebildete Familie sein, wenn Deine Schwester das schon mit 15 Monaten kann. Und Dein Onkel sowieso alles]

@user profile iconJoKaBo Wenn Dein Onkel so ein toller Programmierer ist, dann lass Dich mal von ihm unterrichten! Das könnte echt nicht schaden.
Marko
Namenlosnameless
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 259
Erhaltene Danke: 6

Windows XP Home Edition, Windos Vista
C#
BeitragVerfasst: Do 06.01.11 22:59 
user profile iconJoKaBo hat folgendes geschrieben Zum zitierten Posting springen:
Ich möchte einfach textbox 1 mit textbox 2 Mahlnemen
Z.B. Texbox1 X Textbox2 = TextBox3

Mein Onkel hat mir den Code so gegeben und als ich ihm die Fehlermeldungen gab wuste er auch nicht weiter deshalb habe ich gehoft das einer von eucht auf anhib einen feler findet.


ob da unterricht was hilft?

_________________
1:<<Life sucks!!>> 2:<< Well okay>> 1: <<Just Yours>> 2:<<Ohmph>>
Christian S.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 20451
Erhaltene Danke: 2264

Win 10
C# (VS 2019)
BeitragVerfasst: Do 06.01.11 23:01 
Das reicht jetzt! :mahn: Bitte zurück zum Thema!

_________________
Zwei Worte werden Dir im Leben viele Türen öffnen - "ziehen" und "drücken".
JoKaBo Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 157



BeitragVerfasst: Fr 07.01.11 13:12 
hallo,

ich habe es fast richtig inbekommen[quote].
er zeigt die textBox 1 In der listBox1 an und die txtBox 2 wird im hintergrund gepeichert. aber wen ich jezt auf neuer eintrag gehe steht der text immernoch in der textBox2 Habe es auch schon da mit Probirt:
Zitat:
this.textBox2.Text.Remove(this.textBox2.SelectedText[0]);

Aber Geht nicht dann weist er mich immer zu disem code und makirt ihn gelb
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19314
Erhaltene Danke: 1747

W11 x64 (Chrome, Edge)
Delphi 11 Pro, Oxygene, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Fr 07.01.11 13:17 
user profile iconJoKaBo hat folgendes geschrieben Zum zitierten Posting springen:
Aber Geht nicht dann weist er mich immer zu disem code und makirt ihn gelb
Und da gibt es natürlich keine Fehlermeldung? :roll:
Außerdem: Was willst du damit überhaupt machen?
JoKaBo Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 157



BeitragVerfasst: Fr 07.01.11 13:23 
sorry habe das falsch eingetragen !!!
Namenlosnameless
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 259
Erhaltene Danke: 6

Windows XP Home Edition, Windos Vista
C#
BeitragVerfasst: Fr 07.01.11 13:42 
wenn du was aus ner TextBox löschen willst würde ich die .Text-Eigenschaft auf "" setzten

_________________
1:<<Life sucks!!>> 2:<< Well okay>> 1: <<Just Yours>> 2:<<Ohmph>>